From 94a80aa0cba58f2c38a9ced09d1a879989df4b33 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Mon, 13 Nov 2023 21:13:25 +0100 Subject: [PATCH 001/179] prepare for release 4.1.0 --- build.gradle.kts | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index dfa54924..333f1a66 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,8 +23,8 @@ plugins { eclipse } dependencies { - implementation("org.modelingvalue:immutable-collections:4.0.0-BRANCHED") - implementation("org.modelingvalue:mvg-json:4.0.0-BRANCHED") + implementation("org.modelingvalue:immutable-collections:4.1.0-BRANCHED") + implementation("org.modelingvalue:mvg-json:4.1.0-BRANCHED") } publishing { publications { diff --git a/gradle.properties b/gradle.properties index 3f2a56ce..47258904 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,5 @@ # suppress inspection "UnusedProperty" for whole file group = org.modelingvalue artifact = dclare -version = 4.0.0 +version = 4.1.0 version_java = 17 From dd1db3e4d2848c531b4ca916b34a9456b83eb95b Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 23 Nov 2023 12:21:29 +0100 Subject: [PATCH 002/179] trace too many changes readability improvement --- src/main/java/org/modelingvalue/dclare/ObserverTrace.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index cd74335e..6bc27788 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -134,9 +134,11 @@ private void trace(C context, BiConsumer runHandler, TriCo } private void traceBack(C context, BiConsumer runHandler, TriConsumer readHandler, TriConsumer writeHandler, Function traceHandler, Set[] done, int length) { + for (Entry w : written) { + writeHandler.accept(context, this, w.getKey()); + } for (Entry> e : backTrace()) { if (!e.getValue().isEmpty()) { - writeHandler.accept(context, this, e.getKey()); readHandler.accept(context, this, e.getKey()); for (ObserverTrace writer : e.getValue()) { writer.trace(traceHandler.apply(context), runHandler, readHandler, writeHandler, traceHandler, done, length); From 210a287921d299a16f68ac46bbb65274da5b4a66 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 24 Nov 2023 17:12:34 +0100 Subject: [PATCH 003/179] raw --- .../dclare/ActionTransaction.java | 2 +- .../java/org/modelingvalue/dclare/IState.java | 4 + .../dclare/IdentityDerivationTransaction.java | 2 +- .../dclare/ImperativeTransaction.java | 1 + .../modelingvalue/dclare/LeafTransaction.java | 8 +- .../org/modelingvalue/dclare/MatchInfo.java | 2 +- .../org/modelingvalue/dclare/Mutable.java | 2 +- .../modelingvalue/dclare/MutableState.java | 10 +++ .../modelingvalue/dclare/ObserverTrace.java | 8 +- .../dclare/ObserverTransaction.java | 80 ++++++++++--------- .../dclare/ReadOnlyTransaction.java | 1 - .../org/modelingvalue/dclare/Setable.java | 2 +- .../java/org/modelingvalue/dclare/State.java | 22 +++-- 13 files changed, 87 insertions(+), 57 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 5c21fdb6..0b9b814f 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -61,7 +61,7 @@ protected final State run(State pre) { run(pre, universeTransaction()); if (universeTransaction().getConfig().isTraceActions()) { postState = currentState.merge(); - Map>> diff = preState.diff(postState, o -> o instanceof Mutable, s -> s instanceof Observed /* && !s.isPlumbing() */).asMap(e -> e); + Map>> diff = preState.diff(postState, o -> o instanceof Mutable, s -> s instanceof Observed && !s.isPlumbing()).asMap(e -> e); if (!diff.isEmpty()) { runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (" + postState.shortDiffString(diff, mutable()) + ")")); } diff --git a/src/main/java/org/modelingvalue/dclare/IState.java b/src/main/java/org/modelingvalue/dclare/IState.java index 04f986bb..19273c36 100644 --- a/src/main/java/org/modelingvalue/dclare/IState.java +++ b/src/main/java/org/modelingvalue/dclare/IState.java @@ -37,4 +37,8 @@ public interface IState { Priority priority(Queued queued); + T getRaw(O object, Getable property); + + IState raw(); + } diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 22adfcaa..713d3dd7 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -55,7 +55,7 @@ protected T getNonDerived(O object, Getable getable) { } private boolean isChanged(O object, Getable getable) { - T pre = universeTransaction().preStartState(Priority.OUTER).get(object, getable); + T pre = universeTransaction().preStartState(Priority.OUTER).getRaw(object, getable); T post = universeTransaction().startState(Priority.OUTER).get(object, getable); return !Objects.equals(pre, post); } diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index f730cdcf..1b896da7 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -246,4 +246,5 @@ public Direction direction() { protected String getCurrentTypeForTrace() { return "IM"; } + } diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index adc6ed1d..a271a358 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -102,6 +102,10 @@ public T get(O object, Getable property) { return state().get(object, property); } + public T getRaw(O object, Getable property) { + return state().getRaw(object, property); + } + protected T current(O object, Getable property) { return current().get(object, property); } @@ -202,11 +206,11 @@ public O directConstruct(Construction.Reason reason, Supplie public abstract Direction direction(); - public MutableState preStartState(Priority priority) { + public IState preStartState(Priority priority) { return universeTransaction().preStartState(priority); } - public MutableState startState(Priority priority) { + public IState startState(Priority priority) { return universeTransaction().startState(priority); } diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index 842e9e8e..fa628833 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -41,7 +41,7 @@ private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Obse this.newable = newable; ConstantState constants = otx.universeTransaction().tmpConstants(); removed = otx.startState(Priority.three).get(newable, Mutable.D_PARENT_CONTAINING) == null && // - otx.preStartState(Priority.OUTER).get(newable, Mutable.D_PARENT_CONTAINING) != null; + otx.preStartState(Priority.OUTER).getRaw(newable, Mutable.D_PARENT_CONTAINING) != null; initialConstruction = newable.dInitialConstruction(); allDerivations = newable.dAllDerivations(); identity = constants.get(otx, newable, Newable.D_IDENTITY, n -> { diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 4e1377c2..f4ef930f 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -83,7 +83,7 @@ default QualifiedSet dAllDerivations() { default boolean dBecameOrphan() { LeafTransaction tx = LeafTransaction.getCurrent(); - return tx.preStartState(Priority.OUTER).get(this, Mutable.D_PARENT_CONTAINING) != null && // + return tx.preStartState(Priority.OUTER).getRaw(this, Mutable.D_PARENT_CONTAINING) != null && // tx.state().get(this, Mutable.D_PARENT_CONTAINING) == null; } diff --git a/src/main/java/org/modelingvalue/dclare/MutableState.java b/src/main/java/org/modelingvalue/dclare/MutableState.java index b47c8ace..3bdd1f54 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableState.java +++ b/src/main/java/org/modelingvalue/dclare/MutableState.java @@ -163,4 +163,14 @@ public Priority priority(Queued queued) { return state().priority(queued); } + @Override + public T getRaw(O object, Getable property) { + return state().getRaw(object, property); + } + + @Override + public IState raw() { + return state().raw(); + } + } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 6bc27788..848edd52 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -138,11 +138,9 @@ private void traceBack(C context, BiConsumer runHandler, T writeHandler.accept(context, this, w.getKey()); } for (Entry> e : backTrace()) { - if (!e.getValue().isEmpty()) { - readHandler.accept(context, this, e.getKey()); - for (ObserverTrace writer : e.getValue()) { - writer.trace(traceHandler.apply(context), runHandler, readHandler, writeHandler, traceHandler, done, length); - } + readHandler.accept(context, this, e.getKey()); + for (ObserverTrace writer : e.getValue()) { + writer.trace(traceHandler.apply(context), runHandler, readHandler, writeHandler, traceHandler, done, length); } } } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 00219d54..b58ecc4e 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -36,7 +36,6 @@ public class ObserverTransaction extends ActionTransaction { private static final Set FALSE = Set.of(); private static final Set TRUE = Set.of(true); public static final Context OBSERVE = Context.of(true); - public static final Context RIPPLE_OUT = Context.of(false); @SuppressWarnings("rawtypes") private final Concurrent>> observeds = Concurrent.of(); @@ -401,51 +400,55 @@ private Map actualize(Map map) { @SuppressWarnings("unchecked") private T rippleOut(O object, Observed observed, T pre, T post) { - return RIPPLE_OUT.get(true, () -> { - boolean forward = isForward(object, observed, pre, post); - boolean isNew = !startState(Priority.four).get(mutable(), Mutable.D_OBSERVERS).contains(observer()); - if (isNonMapCollection(pre) && isNonMapCollection(post)) { - ContainingCollection[] result = new ContainingCollection[]{(ContainingCollection) post}; - Observed> many = (Observed>) observed; - Setable. diff(pre, post, added -> { - Priority delay = added(object, many, added, forward, isNew); - if (delay != null) { - defer.set(delay, TRUE); - result[0] = result[0].remove(added); - } - }, removed -> { - Priority delay = removed(object, many, removed, forward, isNew); - if (delay != null) { - defer.set(delay, TRUE); - if (pre instanceof List && post instanceof List) { - int i = Math.min(((List) pre).firstIndexOf(removed), result[0].size()); - result[0] = ((List) result[0]).insert(i, removed); - } else { - result[0] = result[0].add(removed); - } - } - }); - if (!Objects.equals(post, result[0])) { - traceRippleOut(object, observed, post, result[0]); + boolean forward = isForward(object, observed, pre, post); + boolean isNew = !startState(Priority.four).get(mutable(), Mutable.D_OBSERVERS).contains(observer()); + boolean isColl = isNonMapCollection(pre) && isNonMapCollection(post); + boolean isList = isColl && isList(pre) && isList(post); + if (isColl) { + ContainingCollection[] result = new ContainingCollection[]{(ContainingCollection) post}; + Observed> many = (Observed>) observed; + Setable. diff(pre, post, added -> { + Priority delay = added(object, many, added, forward, isNew); + if (delay != null) { + defer.set(delay, TRUE); + result[0] = result[0].remove(added); } - return (T) result[0]; - } else { - Priority delay = changed(object, observed, pre, post, forward, isNew); + }, removed -> { + Priority delay = removed(object, many, removed, forward, isNew); if (delay != null) { defer.set(delay, TRUE); - traceRippleOut(object, observed, post, pre); - return pre; - } else { - return post; + if (pre instanceof List && post instanceof List) { + int i = Math.min(((List) pre).firstIndexOf(removed), result[0].size()); + result[0] = ((List) result[0]).insert(i, removed); + } else { + result[0] = result[0].add(removed); + } } + }); + if (!Objects.equals(post, result[0])) { + traceRippleOut(object, observed, post, result[0]); + return (T) result[0]; + } + } + if (!isColl || isList) { + Priority delay = changed(object, observed, pre, post, forward, isNew); + if (delay != null) { + defer.set(delay, TRUE); + traceRippleOut(object, observed, post, pre); + return pre; } - }); + } + return post; } private boolean isNonMapCollection(T t) { return t instanceof ContainingCollection && !(t instanceof Map) && !(t instanceof DefaultMap); } + private boolean isList(T t) { + return t instanceof List; + } + @SuppressWarnings({"rawtypes", "unchecked"}) private boolean isForward(O outObject, Observed outObserved, T pre, T post) { Mutable mutable = mutable(); @@ -486,14 +489,14 @@ private , E> Priority added(O object, Obser return added(object, observed, startState(Priority.two), state(), added, forward) ? Priority.two : // becameDerived(observed, added, startState(Priority.three), current()) ? Priority.three : // (isNew && added(object, observed, startState(), startState(Priority.four), added, forward)) ? Priority.four : // - added(object, observed, preStartState(Priority.five), startState(Priority.five), added, forward) ? Priority.five : null; + added(object, observed, preStartState(Priority.five).raw(), startState(Priority.five), added, forward) ? Priority.five : null; } private , E> Priority removed(O object, Observed observed, E removed, boolean forward, boolean isNew) { return removed(object, observed, startState(Priority.two), state(), removed, forward) ? Priority.two : // (isNew && removed(object, observed, startState(), startState(Priority.four), removed, forward)) ? Priority.four : // becameContained(observed, removed, startState(Priority.four), startState(Priority.two)) ? Priority.four : // - removed(object, observed, preStartState(Priority.five), startState(Priority.five), removed, forward) ? Priority.five : null; + removed(object, observed, preStartState(Priority.five).raw(), startState(Priority.five), removed, forward) ? Priority.five : null; } private Priority changed(O object, Observed observed, T pre, T post, boolean forward, boolean isNew) { @@ -501,7 +504,7 @@ private Priority changed(O object, Observed observed, T pre, T post becameDerived(observed, post, startState(Priority.three), current()) ? Priority.three : // (isNew && changed(object, observed, startState(), startState(Priority.four), pre, post, forward)) ? Priority.four : // becameContained(observed, pre, startState(Priority.four), startState(Priority.two)) ? Priority.four : // - changed(object, observed, preStartState(Priority.five), startState(Priority.five), pre, post, forward) ? Priority.five : null; + changed(object, observed, preStartState(Priority.five).raw(), startState(Priority.five), pre, post, forward) ? Priority.five : null; } private , E> boolean added(O object, Observed observed, IState preState, IState postState, E added, boolean forward) { @@ -691,4 +694,5 @@ private void replace(MatchInfo replaced, MatchInfo replacing) { protected String getCurrentTypeForTrace() { return "OB"; } + } diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index e9a40420..66dfd1e8 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -107,7 +107,6 @@ public Direction direction() { return Direction.DEFAULT; } - @Override protected String getCurrentTypeForTrace() { return "RO"; diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index b8f49280..bfcb3a95 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -215,7 +215,7 @@ protected final void changed(LeafTransaction tx, O object, T preValue, T postVal } if (containment) { Setable. diff(preValue, postValue, added -> { - Pair> prePair = tx.get(added, Mutable.D_PARENT_CONTAINING); + Pair> prePair = tx.getRaw(added, Mutable.D_PARENT_CONTAINING); if (prePair != null) { MOVING.run(true, () -> prePair.b().remove(prePair.a(), added)); } diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index 9c27e778..a152e886 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -60,15 +60,15 @@ protected State(UniverseTransaction universeTransaction, StateMap stateMap) { } } - private State(UniverseTransaction universeTransaction, DefaultMap> map, Queued>[] actions, Queued[] children) { + protected State(UniverseTransaction universeTransaction, DefaultMap> map, Queued>[] actions, Queued[] children) { super(map); this.universeTransaction = universeTransaction; this.actions = actions; this.children = children; } - private State newState(DefaultMap> newMap) { - return newMap.isEmpty() ? universeTransaction.emptyState() : new State(universeTransaction, newMap, actions, children); + protected State newState(DefaultMap> newMap, Queued>[] actions, Queued[] children) { + return new State(universeTransaction, newMap, actions, children); } @Override @@ -116,7 +116,7 @@ public State exchange(Priority prio1, Priority prio2) { children[prio1.ordinal()] = c2; actions[prio2.ordinal()] = a1; children[prio2.ordinal()] = c1; - return new State(universeTransaction, map(), actions, children); + return newState(map(), actions, children); } public State set(O object, Setable property, T value) { @@ -161,7 +161,7 @@ public State set(O object, Setable property, UnaryOperator fu } State set(O object, DefaultMap post) { - return newState(post.isEmpty() ? map().removeKey(object) : map().put(object, post)); + return newState(post.isEmpty() ? map().removeKey(object) : map().put(object, post), actions, children); } @SuppressWarnings("unchecked") @@ -201,7 +201,7 @@ public State merge(StateMergeHandler changeHandler, State[] branches, int length } } return props; - }, maps, maps.length)); + }, maps, maps.length), actions, children); } @Override @@ -384,4 +384,14 @@ public TransactionId transactionId() { return get(universeTransaction.universe(), Mutable.D_CHANGE_ID); } + @Override + public T getRaw(O object, Getable property) { + return get(object, property); + } + + @Override + public IState raw() { + return getClass() == State.class ? this : new State(universeTransaction, map(), actions, children); + } + } From 5cc9408ad74f5bf870a277f5e7cf0997299a44a5 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 27 Nov 2023 10:29:02 +0100 Subject: [PATCH 004/179] prevent trigger when no change --- .../java/org/modelingvalue/dclare/ActionTransaction.java | 8 ++++---- src/main/java/org/modelingvalue/dclare/ConstantState.java | 5 +++-- .../java/org/modelingvalue/dclare/LeafTransaction.java | 4 ++-- .../org/modelingvalue/dclare/ObserverTransaction.java | 4 ++-- .../org/modelingvalue/dclare/ReadOnlyTransaction.java | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 0b9b814f..335ebc28 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -147,7 +147,7 @@ protected void set(O object, Setable property, T pre, T post) { } return po; }, post, oldNew))) { - changed(object, property, oldNew[0], oldNew[1]); + changed(object, property, pre, oldNew[0], oldNew[1]); } } @@ -157,12 +157,12 @@ protected void setState(State state) { @SuppressWarnings({"rawtypes", "unchecked", "RedundantSuppression"}) @Override - protected void changed(O object, Setable setable, T preValue, T postValue) { - super.changed(object, setable, preValue, postValue); + protected void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + super.changed(object, setable, preValue, rawPreValue, postValue); if (setable.preserved()) { setChanged(object, setable, postValue); } - if (setable instanceof Observed) { + if (setable instanceof Observed && !Objects.equals(preValue, postValue)) { trigger(object, (Observed) setable); } } diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 86655a22..c7d680fe 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -218,8 +218,9 @@ private V set(LeafTransaction tx, O object, Constant constant, Map T pre(O object, Getable property) { return universeTransaction().preState().get(object, property); } - protected void changed(O object, Setable setable, T preValue, T postValue) { - setable.changed(this, object, preValue, postValue); + protected void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + setable.changed(this, object, rawPreValue, postValue); } @SuppressWarnings({"rawtypes", "unchecked"}) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index b58ecc4e..2246b862 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -335,11 +335,11 @@ public T getNonObserving(Supplier action) { @SuppressWarnings({"rawtypes", "unchecked", "RedundantSuppression"}) @Override - protected void changed(O object, Setable setable, T preValue, T postValue) { + protected void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { if (observing(object, setable)) { changed.set(TRUE); } - runNonObserving(() -> super.changed(object, setable, preValue, postValue)); + runNonObserving(() -> super.changed(object, setable, preValue, rawPreValue, postValue)); } private boolean observing(O object, Getable setable) { diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index 66dfd1e8..5dd49bf8 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -61,10 +61,10 @@ public State state() { } @Override - protected void changed(O object, Setable property, T preValue, T postValue) { + protected void changed(O object, Setable property, T preValue, T rawPreValue, T postValue) { if (property instanceof Constant) { if (property.isHandlingChange()) { - universeTransaction().put(new Object(), () -> super.changed(object, property, preValue, postValue)); + universeTransaction().put(new Object(), () -> super.changed(object, property, preValue, rawPreValue, postValue)); } } else { throw new UnsupportedOperationException(); From b50e163d89665357de7bdbc9be554d0dedc1392f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 03:21:08 +0000 Subject: [PATCH 005/179] Bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8d695821..d766c58b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: 17 distribution: zulu From 3b453720784360d7fc5b1cded973200815abec08 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 4 Dec 2023 09:12:54 +0100 Subject: [PATCH 006/179] ripple out cleaner --- .../modelingvalue/dclare/ObserverTransaction.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 2246b862..664efaa4 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -400,10 +400,10 @@ private Map actualize(Map map) { @SuppressWarnings("unchecked") private T rippleOut(O object, Observed observed, T pre, T post) { - boolean forward = isForward(object, observed, pre, post); - boolean isNew = !startState(Priority.four).get(mutable(), Mutable.D_OBSERVERS).contains(observer()); boolean isColl = isNonMapCollection(pre) && isNonMapCollection(post); boolean isList = isColl && isList(pre) && isList(post); + boolean forward = isForward(object, observed, pre, post, isColl); + boolean isNew = !startState(Priority.four).get(mutable(), Mutable.D_OBSERVERS).contains(observer()); if (isColl) { ContainingCollection[] result = new ContainingCollection[]{(ContainingCollection) post}; Observed> many = (Observed>) observed; @@ -417,7 +417,7 @@ Setable. diff(pre, post, added -> { Priority delay = removed(object, many, removed, forward, isNew); if (delay != null) { defer.set(delay, TRUE); - if (pre instanceof List && post instanceof List) { + if (isList) { int i = Math.min(((List) pre).firstIndexOf(removed), result[0].size()); result[0] = ((List) result[0]).insert(i, removed); } else { @@ -450,15 +450,13 @@ private boolean isList(T t) { } @SuppressWarnings({"rawtypes", "unchecked"}) - private boolean isForward(O outObject, Observed outObserved, T pre, T post) { + private boolean isForward(O outObject, Observed outObserved, T pre, T post, boolean isColl) { Mutable mutable = mutable(); Pair> intermediatePair = startState(Priority.INNER).get(mutable, Mutable.D_PARENT_CONTAINING); if (!Objects.equals(preStartState(Priority.INNER).get(mutable, Mutable.D_PARENT_CONTAINING), intermediatePair) || !Objects.equals(intermediatePair, state().get(mutable, Mutable.D_PARENT_CONTAINING))) { return true; } else { - boolean handlingContainingCollections = pre instanceof ContainingCollection && post instanceof ContainingCollection; Boolean[] match = new Boolean[]{null}; - return observeds.get().anyMatch(e -> e.getValue().anyMatch(o -> { Observed inObserved = e.getKey(); if (!inObserved.isPlumbing()) { @@ -466,7 +464,7 @@ private boolean isForward(O outObject, Observed outObserved, T p if (!inObject.equals(outObject) || !inObserved.equals(outObserved)) { Object intermediateObject = startState(Priority.INNER).get(inObject, inObserved); return !Objects.equals(preStartState(Priority.INNER).get(inObject, inObserved), intermediateObject) || !Objects.equals(intermediateObject, state().get(inObject, inObserved)); - } else if (handlingContainingCollections) { + } else if (isColl) { if (match[0] == null) { match[0] = isChanged(outObject, outObserved, (ContainingCollection) pre, (ContainingCollection) post, preStartState(Priority.INNER), startState(Priority.INNER)) // || isChanged(outObject, outObserved, (ContainingCollection) pre, (ContainingCollection) post, startState(Priority.INNER), state()); From decd1a17d03432cd092cc482962f79907b523bde Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 5 Dec 2023 12:38:45 +0100 Subject: [PATCH 007/179] debug tracing too many changes fixes --- .../dclare/NonCheckingObserver.java | 5 +- .../dclare/ObserverTransaction.java | 42 ++-- .../dclare/UniverseStatistics.java | 184 ++++++++---------- .../dclare/UniverseTransaction.java | 6 +- 4 files changed, 113 insertions(+), 124 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java index 1df38b01..28a7f7a9 100644 --- a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java @@ -68,13 +68,12 @@ protected void checkTooManyObserved(Mutable mutable, DefaultMap> observeds) { - return 0; + protected void checkTooManyChanges(State pre, DefaultMap> observeds) { } @SuppressWarnings("rawtypes") @Override - protected void trace(State pre, DefaultMap> observeds, int changes) { + protected void trace(State pre, DefaultMap> observeds) { } } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 664efaa4..74a05188 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -46,6 +46,8 @@ public class ObserverTransaction extends ActionTransaction { private final Concurrents> defer = new Concurrents<>(Priority.two); private Pair throwable; + private int nrOfChanges; + private int totalNrOfChanges; protected ObserverTransaction(UniverseTransaction universeTransaction) { super(universeTransaction); @@ -121,6 +123,8 @@ protected final void run(State pre, UniverseTransaction universeTransaction) { constructions.clear(); emptyMandatory.clear(); throwable = null; + nrOfChanges = 0; + totalNrOfChanges = 0; } } } @@ -136,9 +140,8 @@ private void finish(State pre, Observer observer) { try { DefaultMap> observeds = this.observeds.get(); checkTooManyObserved(mutable, observeds); - int nrOfChanges = 0; if (!observer.atomic() && changed.get().equals(TRUE)) { - nrOfChanges = checkTooManyChanges(pre, observeds); + checkTooManyChanges(pre, observeds); trigger(mutable, (Observer) observer, Priority.one); } else { Priority def = defer.first(TRUE::equals); @@ -146,11 +149,11 @@ private void finish(State pre, Observer observer) { rollback(observer.atomic()); trigger(mutable, (Observer) observer, def); } else if (changed.get().equals(TRUE)) { - nrOfChanges = checkTooManyChanges(pre, observeds); + checkTooManyChanges(pre, observeds); trigger(mutable, (Observer) observer, Priority.one); } } - trace(pre, observeds, nrOfChanges); + trace(pre, observeds); DefaultMap preSources = super.set(mutable, observer.observeds(), observeds); if (preSources.isEmpty() && !observeds.isEmpty()) { observer.addInstance(); @@ -180,19 +183,13 @@ protected void checkTooManyObserved(Mutable mutable, DefaultMap> observeds) { + protected void checkTooManyChanges(State pre, DefaultMap> observeds) { UniverseStatistics stats = universeTransaction().stats(); - int totalChanges = stats.bumpAndGetTotalChanges(); - int changesPerInstance = observer().countChangesPerInstance(); - if (stats.maxTotalNrOfChanges() < totalChanges) { + totalNrOfChanges = stats.bumpAndGetTotalChanges(); + nrOfChanges = observer().countChangesPerInstance(); + if (stats.tooManyChangesPerInstance(nrOfChanges, observer(), mutable()) || stats.maxTotalNrOfChanges() < totalNrOfChanges) { stats.setDebugging(true); - return totalChanges; } - if (stats.tooManyChangesPerInstance(changesPerInstance, observer(), mutable())) { - stats.setDebugging(true); - return changesPerInstance; - } - return 0; } @Override @@ -201,21 +198,26 @@ protected void bumpTotalChanges() { } @SuppressWarnings({"rawtypes"}) - protected void trace(State pre, DefaultMap> observeds, int changes) { + protected void trace(State pre, DefaultMap> observeds) { if (observer().isTracing()) { - trace(pre, observeds, changes, observer().traces()); + trace(pre, observeds, observer().traces(), nrOfChanges); } UniverseStatistics stats = universeTransaction().stats(); if (stats.debugging() && changed.get().equals(TRUE)) { - ObserverTrace trace = trace(pre, observeds, changes, observer().debugs()); - if (trace.done().size() > stats.maxNrOfChanges() || changes > stats.maxTotalNrOfChanges() + stats.maxNrOfChanges() * 2) { - throw new TooManyChangesException(current(), trace, changes); + int maxNrOfChanges = stats.maxNrOfChanges(); + ObserverTrace trace = trace(pre, observeds, observer().debugs(), nrOfChanges > maxNrOfChanges ? nrOfChanges : totalNrOfChanges); + if (nrOfChanges > maxNrOfChanges + Math.min(maxNrOfChanges, 32)) { + throw new TooManyChangesException(current(), trace, nrOfChanges); + } + int maxTotalNrOfChanges = stats.maxTotalNrOfChanges(); + if (totalNrOfChanges > maxTotalNrOfChanges + Math.min(maxTotalNrOfChanges, 128)) { + throw new TooManyChangesException(current(), trace, totalNrOfChanges); } } } @SuppressWarnings({"rawtypes", "unchecked"}) - private ObserverTrace trace(State pre, DefaultMap> observeds, int changes, Setable> setable) { + private ObserverTrace trace(State pre, DefaultMap> observeds, Setable> setable, int changes) { List traces = setable.get(mutable()); ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), changes, // observeds.filter(e -> !e.getKey().isPlumbing()).flatMap(e -> e.getValue().map(m -> { diff --git a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java index 31c915e7..770ea6ea 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java @@ -15,14 +15,14 @@ package org.modelingvalue.dclare; -import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.*; +import java.util.Objects; -import java.util.*; +import org.modelingvalue.collections.DefaultMap; +import org.modelingvalue.collections.Set; @SuppressWarnings({"unused", "rawtypes"}) public class UniverseStatistics { - private final UniverseTransaction tx; + private final UniverseTransaction tx; private boolean debugging; private long runCount; @@ -46,8 +46,8 @@ public static class ChampionObserver { public final DefaultMap> observers; public ChampionObserver(Observed observed, Mutable mutable, DefaultMap> observers) { - this.observed = observed; - this.mutable = mutable; + this.observed = observed; + this.mutable = mutable; this.observers = observers; } @@ -80,8 +80,8 @@ public static class ChampionObserved { public final DefaultMap> observeds; public ChampionObserved(Observer observer, Mutable mutable, DefaultMap> observeds) { - this.observer = observer; - this.mutable = mutable; + this.observer = observer; + this.mutable = mutable; this.observeds = observeds; } @@ -114,7 +114,7 @@ public static class ChampionChangesPerInstance { public ChampionChangesPerInstance(Observer observer, Mutable mutable) { this.observer = observer; - this.mutable = mutable; + this.mutable = mutable; } @Override @@ -146,19 +146,19 @@ public UniverseStatistics(UniverseTransaction tx) { public UniverseStatistics(UniverseStatistics o) { this(o.tx); - this.debugging = o.debugging; - this.runCount = o.runCount; - this.forwardCount = o.forwardCount; - this.totalChanges = o.totalChanges; - this.totalChangesEver = o.totalChangesEver; - this.mostTotalChangesEver = o.mostTotalChangesEver; - this.mostObservers = o.mostObservers; - this.mostObserversEver = o.mostObserversEver; - this.championObservers = o.championObservers; - this.mostObserved = o.mostObserved; - this.mostObservedEver = o.mostObservedEver; - this.championObserved = o.championObserved; - this.mostChangesPerInstance = o.mostChangesPerInstance; + this.debugging = o.debugging; + this.runCount = o.runCount; + this.forwardCount = o.forwardCount; + this.totalChanges = o.totalChanges; + this.totalChangesEver = o.totalChangesEver; + this.mostTotalChangesEver = o.mostTotalChangesEver; + this.mostObservers = o.mostObservers; + this.mostObserversEver = o.mostObserversEver; + this.championObservers = o.championObservers; + this.mostObserved = o.mostObserved; + this.mostObservedEver = o.mostObservedEver; + this.championObserved = o.championObserved; + this.mostChangesPerInstance = o.mostChangesPerInstance; this.mostChangesPerInstanceEver = o.mostChangesPerInstanceEver; this.championChangesPerInstance = o.championChangesPerInstance; } @@ -189,9 +189,9 @@ void completeRun() { mostChangesPerInstance = 0; totalChangesEver += totChan; - mostTotalChangesEver = Math.max(mostTotalChangesEver, totChan); - mostObserversEver = Math.max(mostObserversEver, mostObs); - mostObservedEver = Math.max(mostObservedEver, mostObd); + mostTotalChangesEver = Math.max(mostTotalChangesEver, totChan); + mostObserversEver = Math.max(mostObserversEver, mostObs); + mostObservedEver = Math.max(mostObservedEver, mostObd); mostChangesPerInstanceEver = Math.max(mostChangesPerInstanceEver, mostChpi); } @@ -232,17 +232,14 @@ public int bumpAndGetTotalChanges() { } public int totalChanges() { - tx.throwIfError(); return totalChanges; } public long totalChangesEver() { - tx.throwIfError(); return totalChangesEver; } public long mostTotalChangesEver() { - tx.throwIfError(); return mostTotalChangesEver; } @@ -257,14 +254,14 @@ public boolean tooManyChangesPerInstance(int n, Observer observer, Mutable mu } if (n <= maxNrOfChanges()) { if (mostChangesPerInstance < n) { - mostChangesPerInstance = n; + mostChangesPerInstance = n; championChangesPerInstance = new ChampionChangesPerInstance(observer, mutable); } return false; } synchronized (tx) { if (mostChangesPerInstance < n) { - mostChangesPerInstance = n; + mostChangesPerInstance = n; championChangesPerInstance = new ChampionChangesPerInstance(observer, mutable); } } @@ -272,17 +269,14 @@ public boolean tooManyChangesPerInstance(int n, Observer observer, Mutable mu } public int mostChangesPerInstance() { - tx.throwIfError(); return mostChangesPerInstance; } public long mostChangesPerInstanceEver() { - tx.throwIfError(); return mostChangesPerInstanceEver; } public ChampionChangesPerInstance championChangesPerInstance() { - tx.throwIfError(); return championChangesPerInstance; } @@ -291,21 +285,21 @@ public int maxNrOfObservers() { return tx.getConfig().getMaxNrOfObservers(); } - public boolean tooManyObservers(Observed observed, Object /*always Mutable*/ o, DefaultMap> observers) { + public boolean tooManyObservers(Observed observed, Object /* always Mutable */ o, DefaultMap> observers) { if (!devMode()) { return false; } int n = LeafTransaction.sizeForConsistency(observers); if (n <= maxNrOfObservers()) { if (mostObservers < n) { - mostObservers = n; + mostObservers = n; championObservers = new ChampionObserver(observed, o instanceof Mutable ? (Mutable) o : null, observers); } return false; } synchronized (tx) { if (mostObservers < n) { - mostObservers = n; + mostObservers = n; championObservers = new ChampionObserver(observed, o instanceof Mutable ? (Mutable) o : null, observers); } } @@ -313,17 +307,14 @@ public boolean tooManyObservers(Observed observed, Object /*always Mutable*/ o, } public int mostObservers() { - tx.throwIfError(); return mostObservers; } public long mostObserversEver() { - tx.throwIfError(); return mostObserversEver; } public ChampionObserver championObservers() { - tx.throwIfError(); return championObservers; } @@ -339,14 +330,14 @@ public boolean tooManyObserved(Observer observer, Mutable mutable, DefaultMap int n = LeafTransaction.sizeForConsistency(observeds); if (n <= maxNrOfObserved()) { if (mostObserved < n) { - mostObserved = n; + mostObserved = n; championObserved = new ChampionObserved(observer, mutable, observeds); } return false; } synchronized (tx) { if (mostObserved < n) { - mostObserved = n; + mostObserved = n; championObserved = new ChampionObserved(observer, mutable, observeds); } } @@ -354,17 +345,14 @@ public boolean tooManyObserved(Observer observer, Mutable mutable, DefaultMap } public int mostObserved() { - tx.throwIfError(); return mostObserved; } public long mostObservedEver() { - tx.throwIfError(); return mostObservedEver; } public ChampionObserved championObserved() { - tx.throwIfError(); return championObserved; } @@ -376,32 +364,32 @@ public UniverseTransaction universeTransaction() { @Override public String toString() { return "UniverseStats:\n" // - + " debugging = " + debugging + "\n" // - + " runCount = " + runCount + "\n" // - + " forwardCount = " + forwardCount + "\n" // - + " totalChanges = " + totalChanges + "\n" // - + " totalChangesEver = " + totalChangesEver + "\n" // - + " mostTotalChangesEver = " + mostTotalChangesEver + "\n" // - + " mostObservers = " + mostObservers + "\n" // - + " mostObserversEver = " + mostObserversEver + "\n" // - + " championObservers = " + championObservers + "\n" // - + " mostObserved = " + mostObserved + "\n" // - + " mostObservedEver = " + mostObservedEver + "\n" // - + " championObserved = " + championObserved + "\n" // - + " mostChangesPerInstance = " + mostChangesPerInstance + "\n" // - + " mostChangesPerInstanceEver = " + mostChangesPerInstanceEver + "\n" // - + " championChangesPerInstance = " + championChangesPerInstance + "\n" // - ; + + " debugging = " + debugging + "\n" // + + " runCount = " + runCount + "\n" // + + " forwardCount = " + forwardCount + "\n" // + + " totalChanges = " + totalChanges + "\n" // + + " totalChangesEver = " + totalChangesEver + "\n" // + + " mostTotalChangesEver = " + mostTotalChangesEver + "\n" // + + " mostObservers = " + mostObservers + "\n" // + + " mostObserversEver = " + mostObserversEver + "\n" // + + " championObservers = " + championObservers + "\n" // + + " mostObserved = " + mostObserved + "\n" // + + " mostObservedEver = " + mostObservedEver + "\n" // + + " championObserved = " + championObserved + "\n" // + + " mostChangesPerInstance = " + mostChangesPerInstance + "\n" // + + " mostChangesPerInstanceEver = " + mostChangesPerInstanceEver + "\n" // + + " championChangesPerInstance = " + championChangesPerInstance + "\n" // + ; } public String shortString() { return String.format("[debug=%-5s run=%6d forward=%6d changes=%6d/%6d/%6d pInst=%6d/%6d/%s observers=%6d/%6d/%s observed=%6d/%6d/%s]", // - debugging, runCount, forwardCount, // - totalChanges, mostTotalChangesEver, totalChangesEver, // - mostChangesPerInstance, mostChangesPerInstanceEver, championChangesPerInstance, // - mostObservers, mostObserversEver, championObservers, // - mostObserved, mostObservedEver, championObserved // - ); + debugging, runCount, forwardCount, // + totalChanges, mostTotalChangesEver, totalChangesEver, // + mostChangesPerInstance, mostChangesPerInstanceEver, championChangesPerInstance, // + mostObservers, mostObserversEver, championObservers, // + mostObserved, mostObservedEver, championObserved // + ); } @Override @@ -414,42 +402,42 @@ public boolean equals(Object o) { } UniverseStatistics that = (UniverseStatistics) o; return tx == that.tx // - && debugging == that.debugging // - && runCount == that.runCount // - && forwardCount == that.forwardCount // - && totalChanges == that.totalChanges // - && totalChangesEver == that.totalChangesEver // - && mostTotalChangesEver == that.mostTotalChangesEver // - && mostObservers == that.mostObservers // - && mostObserversEver == that.mostObserversEver // - && Objects.equals(championObservers, that.championObservers) // - && mostObserved == that.mostObserved // - && mostObservedEver == that.mostObservedEver // - && Objects.equals(championObserved, that.championObserved) // - && mostChangesPerInstance == that.mostChangesPerInstance // - && mostChangesPerInstanceEver == that.mostChangesPerInstanceEver // - && Objects.equals(championChangesPerInstance, that.championChangesPerInstance) // - ; + && debugging == that.debugging // + && runCount == that.runCount // + && forwardCount == that.forwardCount // + && totalChanges == that.totalChanges // + && totalChangesEver == that.totalChangesEver // + && mostTotalChangesEver == that.mostTotalChangesEver // + && mostObservers == that.mostObservers // + && mostObserversEver == that.mostObserversEver // + && Objects.equals(championObservers, that.championObservers) // + && mostObserved == that.mostObserved // + && mostObservedEver == that.mostObservedEver // + && Objects.equals(championObserved, that.championObserved) // + && mostChangesPerInstance == that.mostChangesPerInstance // + && mostChangesPerInstanceEver == that.mostChangesPerInstanceEver // + && Objects.equals(championChangesPerInstance, that.championChangesPerInstance) // + ; } @Override public int hashCode() { return Objects.hash(tx, // - debugging, // - runCount, // - forwardCount, // - totalChanges, // - totalChangesEver, // - mostTotalChangesEver, // - mostObservers, // - mostObserversEver, // - championObservers, // - mostObserved, // - mostObservedEver, // - championObserved, // - mostChangesPerInstance, // - mostChangesPerInstanceEver, // - championChangesPerInstance // - ); + debugging, // + runCount, // + forwardCount, // + totalChanges, // + totalChangesEver, // + mostTotalChangesEver, // + mostObservers, // + mostObserversEver, // + championObservers, // + mostObserved, // + mostObservedEver, // + championObserved, // + mostChangesPerInstance, // + mostChangesPerInstanceEver, // + championChangesPerInstance // + ); } } diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 142b47e5..622f8e56 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -582,11 +582,11 @@ private State triggerAction(State state, Action action) { private void handleTooManyChanges(State state) { if (!killed && stats().debugging() && !errors.get().anyMatch(e -> e instanceof TooManyChangesException)) { ObserverTrace trace = state// - .filter(o -> o instanceof Mutable, s -> s instanceof Observer.Traces) // - .flatMap(e1 -> e1.getValue().map(e2 -> ((Set) e2.getValue()).sorted().findFirst().orElseThrow())) // + .filter(o -> o instanceof Mutable, s -> s instanceof Observer.Debugs) // + .flatMap(e1 -> e1.getValue().map(e2 -> ((List) e2.getValue()).last())) // .min((a, b) -> Integer.compare(b.done().size(), a.done().size())) // .orElseThrow(); - throw new TooManyChangesException(state, trace, trace.done().size()); + throw new TooManyChangesException(state, trace, stats().totalChanges()); } } From 778ffa0b894afdfeba1f7125cb0986a069ddb660 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Tue, 5 Dec 2023 13:22:00 +0100 Subject: [PATCH 008/179] minor reshuffle caused by Context class changes in imm-coll --- .../org/modelingvalue/dclare/DclareTrace.java | 6 ++--- .../org/modelingvalue/dclare/OneShot.java | 2 +- .../dclare/UniverseTransaction.java | 22 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/DclareTrace.java b/src/main/java/org/modelingvalue/dclare/DclareTrace.java index b4d3f1f5..153cfdf4 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareTrace.java +++ b/src/main/java/org/modelingvalue/dclare/DclareTrace.java @@ -15,11 +15,11 @@ package org.modelingvalue.dclare; +import org.modelingvalue.collections.util.ContextThread; + import java.util.Arrays; import java.util.stream.IntStream; -import org.modelingvalue.collections.util.ContextThread; - public class DclareTrace { private static final int TAG_LENGTH = 8; @@ -34,7 +34,7 @@ public class DclareTrace { public static String getLineStart(String tag, Transaction current) { StringBuilder b = new StringBuilder(TRACE_BASE); superImpose(b, tag.length() <= TAG_LENGTH ? tag : tag.substring(0, TAG_LENGTH), 0); - superImpose(b, getThreadNum(ContextThread.getNr()), TAG_LENGTH + 1); + superImpose(b, getThreadNum(ContextThread.getCurrentNr()), TAG_LENGTH + 1); if (current != null) { superImpose(b, current.getCurrentTypeForTrace(), TAG_LENGTH + 1 + THREAD_NUM_LENGTH + 1); } diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 006b1858..edde06b8 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -20,7 +20,7 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.ContextThread; -import org.modelingvalue.collections.util.ContextThread.ContextPool; +import org.modelingvalue.collections.util.ContextPool; import org.modelingvalue.collections.util.MutationWrapper; import java.lang.annotation.ElementType; diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 142b47e5..11d343dc 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -15,23 +15,13 @@ package org.modelingvalue.dclare; -import java.util.Iterator; -import java.util.Objects; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; -import java.util.function.Predicate; - import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.DefaultMap; import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Concurrent; -import org.modelingvalue.collections.util.ContextThread.ContextPool; +import org.modelingvalue.collections.util.ContextPool; import org.modelingvalue.collections.util.StatusProvider; import org.modelingvalue.collections.util.StatusProvider.AbstractStatus; import org.modelingvalue.collections.util.StatusProvider.StatusIterator; @@ -41,6 +31,16 @@ import org.modelingvalue.dclare.ex.ConsistencyError; import org.modelingvalue.dclare.ex.TooManyChangesException; +import java.util.Iterator; +import java.util.Objects; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; +import java.util.function.Predicate; + @SuppressWarnings("unused") public class UniverseTransaction extends MutableTransaction { From af7fc78264b8ac46278ddc5e681daf832292017c Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 5 Dec 2023 15:11:13 +0100 Subject: [PATCH 009/179] wait for trace with depth --- .../java/org/modelingvalue/dclare/ObserverTransaction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 74a05188..f72cc1a3 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -206,11 +206,11 @@ protected void trace(State pre, DefaultMap> observeds) { if (stats.debugging() && changed.get().equals(TRUE)) { int maxNrOfChanges = stats.maxNrOfChanges(); ObserverTrace trace = trace(pre, observeds, observer().debugs(), nrOfChanges > maxNrOfChanges ? nrOfChanges : totalNrOfChanges); - if (nrOfChanges > maxNrOfChanges + Math.min(maxNrOfChanges, 32)) { + if (trace.done().size() > Math.min(maxNrOfChanges, 32)) { throw new TooManyChangesException(current(), trace, nrOfChanges); } int maxTotalNrOfChanges = stats.maxTotalNrOfChanges(); - if (totalNrOfChanges > maxTotalNrOfChanges + Math.min(maxTotalNrOfChanges, 128)) { + if (totalNrOfChanges > maxTotalNrOfChanges + Math.min(maxTotalNrOfChanges, 256)) { throw new TooManyChangesException(current(), trace, totalNrOfChanges); } } From 573bab7fa438f2c62395583a6ea21c46a68adef6 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Wed, 6 Dec 2023 14:55:18 +0100 Subject: [PATCH 010/179] minor hashCode improvements --- .../java/org/modelingvalue/dclare/Leaf.java | 15 ++++---- .../org/modelingvalue/dclare/Mutable.java | 7 +++- .../java/org/modelingvalue/dclare/This.java | 37 ++++++++++++------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Leaf.java b/src/main/java/org/modelingvalue/dclare/Leaf.java index 0de4080c..ebc4e3d3 100644 --- a/src/main/java/org/modelingvalue/dclare/Leaf.java +++ b/src/main/java/org/modelingvalue/dclare/Leaf.java @@ -15,35 +15,37 @@ package org.modelingvalue.dclare; +import java.util.Objects; + import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.StringUtil; public abstract class Leaf implements TransactionClass, Feature { - private final Object id; private final Priority initPriority; private final Set> modifierSet; + private final int hashCode; protected Leaf(Object id, LeafModifier... modifiers) { - this.id = id; + this.id = id; this.modifierSet = Collection.of(modifiers).notNull().asSet(); Priority prio = getModifier(Priority.class); this.initPriority = prio == null ? Priority.one : prio; + this.hashCode = Objects.hash(id, getClass()); } public boolean hasModifier(LeafModifier modifier) { return modifierSet.contains(modifier); } - @SuppressWarnings({"unused", "unchecked"}) - public > SM getModifier(Class modifierClass) { - return (SM) FeatureModifier.ofClass(modifierClass, modifierSet); + protected > SM getModifier(Class modifierClass) { + return FeatureModifier.ofClass(modifierClass, modifierSet); } @Override public int hashCode() { - return id.hashCode() ^ getClass().hashCode(); + return hashCode; } @Override @@ -71,5 +73,4 @@ public Object id() { protected Priority initPriority() { return initPriority; } - } diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 4e1377c2..fee10277 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -15,7 +15,10 @@ package org.modelingvalue.dclare; -import static org.modelingvalue.dclare.CoreSetableModifier.*; +import static org.modelingvalue.dclare.CoreSetableModifier.doNotMerge; +import static org.modelingvalue.dclare.CoreSetableModifier.durable; +import static org.modelingvalue.dclare.CoreSetableModifier.plumbing; +import static org.modelingvalue.dclare.CoreSetableModifier.preserved; import java.util.function.Predicate; @@ -31,7 +34,7 @@ @SuppressWarnings("unused") public interface Mutable extends TransactionClass { - Mutable THIS = new This(); + Mutable THIS = This.singleton(); Set THIS_SINGLETON = Set.of(THIS); diff --git a/src/main/java/org/modelingvalue/dclare/This.java b/src/main/java/org/modelingvalue/dclare/This.java index 46d6deb2..b64b3e55 100644 --- a/src/main/java/org/modelingvalue/dclare/This.java +++ b/src/main/java/org/modelingvalue/dclare/This.java @@ -16,27 +16,32 @@ package org.modelingvalue.dclare; import java.io.Serializable; +import java.util.Random; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Internable; public final class This implements Mutable, Internable, Serializable { - private static final long serialVersionUID = 5000610308072466985L; - private static final MutableClass THIS_CLASS = new MutableClass() { - @Override - public Set> dObservers() { - return Set.of(); - } - - @Override - public Set> dSetables() { - return Set.of(); - } - }; - - public This() { + @Override + public Set> dObservers() { + return Set.of(); + } + + @Override + public Set> dSetables() { + return Set.of(); + } + }; + private static final int HASH = new Random().nextInt(); + private static final This THIS = new This(); + + public static This singleton() { + return THIS; + } + + private This() { super(); } @@ -55,4 +60,8 @@ public final Mutable dResolve(Mutable self) { return self; } + @Override + public int hashCode() { + return HASH; + } } From ea4037ac971de66a8f3921a429c78001b64c0596 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 7 Dec 2023 12:19:01 +0100 Subject: [PATCH 011/179] fixpoint groups --- .../java/org/modelingvalue/dclare/Action.java | 6 ++- .../dclare/ActionTransaction.java | 3 +- .../org/modelingvalue/dclare/Direction.java | 44 ++++++++++++++++--- .../modelingvalue/dclare/FixpointGroup.java | 23 ++++++++++ .../java/org/modelingvalue/dclare/Leaf.java | 2 +- .../modelingvalue/dclare/LeafTransaction.java | 4 ++ .../modelingvalue/dclare/ObserverTrace.java | 1 + .../dclare/ObserverTransaction.java | 16 +++---- 8 files changed, 81 insertions(+), 18 deletions(-) create mode 100644 src/main/java/org/modelingvalue/dclare/FixpointGroup.java diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index e0eaeaa0..1374e405 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -69,10 +69,14 @@ public ActionTransaction newTransaction(UniverseTransaction universeTransaction) return new ActionTransaction(universeTransaction); } - public Direction direction() { + public final Direction direction() { return direction; } + public final FixpointGroup fixpointGroup() { + return direction().fixpointGroup(); + } + @Override public String toString() { return (direction != Direction.DEFAULT ? (direction + "::") : "") + super.toString(); diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 335ebc28..23741e0d 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -175,7 +175,8 @@ private void trigger(O object, Observed observed) { for (Mutable m : e.getValue()) { Mutable target = m.dResolve((Mutable) object); if (!action().equals(observer) || !source.equals(target)) { - trigger(target, observer, observer.initPriority()); + Priority priority = observer.fixpointGroup() == fixpointGroup() ? observer.initPriority() : Priority.OUTER; + trigger(target, observer, priority); if (universeTransaction().getConfig().isTraceMutable()) { runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (TRIGGER " + target + "." + observer + ")")); } diff --git a/src/main/java/org/modelingvalue/dclare/Direction.java b/src/main/java/org/modelingvalue/dclare/Direction.java index 567830c2..b5ec7750 100644 --- a/src/main/java/org/modelingvalue/dclare/Direction.java +++ b/src/main/java/org/modelingvalue/dclare/Direction.java @@ -24,19 +24,35 @@ public interface Direction extends LeafModifier, SetableModifier, Internable { static Direction of(Object id, Direction... opposites) { - return new DirectionImpl(id, false, opposites); + return new DirectionImpl(id, false, FixpointGroup.DEFAULT, opposites); } static Direction of(Object id, Supplier> oppositeSupplier) { - return new DirectionImpl(id, false, oppositeSupplier); + return new DirectionImpl(id, false, FixpointGroup.DEFAULT, oppositeSupplier); } static Direction of(Object id, boolean lazy, Direction... opposites) { - return new DirectionImpl(id, lazy, opposites); + return new DirectionImpl(id, lazy, FixpointGroup.DEFAULT, opposites); } static Direction of(Object id, boolean lazy, Supplier> oppositeSupplier) { - return new DirectionImpl(id, lazy, oppositeSupplier); + return new DirectionImpl(id, lazy, FixpointGroup.DEFAULT, oppositeSupplier); + } + + static Direction of(Object id, FixpointGroup fixpointGroup, Direction... opposites) { + return new DirectionImpl(id, false, fixpointGroup, opposites); + } + + static Direction of(Object id, FixpointGroup fixpointGroup, Supplier> oppositeSupplier) { + return new DirectionImpl(id, false, fixpointGroup, oppositeSupplier); + } + + static Direction of(Object id, boolean lazy, FixpointGroup fixpointGroup, Direction... opposites) { + return new DirectionImpl(id, lazy, fixpointGroup, opposites); + } + + static Direction of(Object id, boolean lazy, FixpointGroup fixpointGroup, Supplier> oppositeSupplier) { + return new DirectionImpl(id, lazy, fixpointGroup, oppositeSupplier); } Direction DEFAULT = new Direction() { @@ -54,28 +70,37 @@ public Set opposites() { public boolean isLazy() { return false; } + + @Override + public FixpointGroup fixpointGroup() { + return FixpointGroup.DEFAULT; + } }; Set opposites(); boolean isLazy(); + FixpointGroup fixpointGroup(); + static final class DirectionImpl implements Direction { private final Object id; private final boolean lazy; private final Supplier> oppositeSupplier; + private final FixpointGroup fixpointGroup; private Set opposites = null; - private DirectionImpl(Object id, boolean lazy, Direction... opposites) { - this(id, lazy, () -> Collection.of(opposites).asSet()); + private DirectionImpl(Object id, boolean lazy, FixpointGroup fixpointGroup, Direction... opposites) { + this(id, lazy, fixpointGroup, () -> Collection.of(opposites).asSet()); } - private DirectionImpl(Object id, boolean lazy, Supplier> oppositeSupplier) { + private DirectionImpl(Object id, boolean lazy, FixpointGroup fixpointGroup, Supplier> oppositeSupplier) { this.id = id; this.lazy = lazy; this.oppositeSupplier = oppositeSupplier; + this.fixpointGroup = fixpointGroup; } @Override @@ -112,6 +137,11 @@ public Set opposites() { return opposites; } + @Override + public final FixpointGroup fixpointGroup() { + return fixpointGroup; + } + } } diff --git a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java new file mode 100644 index 00000000..a23b8d7a --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java @@ -0,0 +1,23 @@ +package org.modelingvalue.dclare; + +public interface FixpointGroup { + + FixpointGroup DEFAULT = new FixpointGroup() { + + @Override + public String toString() { + return ""; + } + + }; + + static FixpointGroup of(String name) { + return new FixpointGroup() { + @Override + public String toString() { + return name; + } + }; + } + +} diff --git a/src/main/java/org/modelingvalue/dclare/Leaf.java b/src/main/java/org/modelingvalue/dclare/Leaf.java index 0de4080c..222b11de 100644 --- a/src/main/java/org/modelingvalue/dclare/Leaf.java +++ b/src/main/java/org/modelingvalue/dclare/Leaf.java @@ -68,7 +68,7 @@ public Object id() { return id; } - protected Priority initPriority() { + protected final Priority initPriority() { return initPriority; } diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index 61602ae5..c476c3af 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -206,6 +206,10 @@ public O directConstruct(Construction.Reason reason, Supplie public abstract Direction direction(); + public final FixpointGroup fixpointGroup() { + return direction().fixpointGroup(); + } + public IState preStartState(Priority priority) { return universeTransaction().preStartState(priority); } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 848edd52..7019610e 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -65,6 +65,7 @@ protected ObserverTrace(Mutable mutable, Observer observer, ObserverTrace pre this.backTrace = backTrace; this.done = done.addAll(back).addAll(backDone).addAll(previous != null ? previous.done.add(previous) : Set.of()); this.time = Instant.now(); + System.err.println("!!!!!!!!!!! " + this.done.size()); } public Instant time() { diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index f72cc1a3..d4bf6d23 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -200,26 +200,26 @@ protected void bumpTotalChanges() { @SuppressWarnings({"rawtypes"}) protected void trace(State pre, DefaultMap> observeds) { if (observer().isTracing()) { - trace(pre, observeds, observer().traces(), nrOfChanges); + trace(pre, observeds, observer().traces()); } UniverseStatistics stats = universeTransaction().stats(); if (stats.debugging() && changed.get().equals(TRUE)) { - int maxNrOfChanges = stats.maxNrOfChanges(); - ObserverTrace trace = trace(pre, observeds, observer().debugs(), nrOfChanges > maxNrOfChanges ? nrOfChanges : totalNrOfChanges); - if (trace.done().size() > Math.min(maxNrOfChanges, 32)) { + ObserverTrace trace = trace(pre, observeds, observer().debugs()); + if (nrOfChanges > Math.min(stats.maxNrOfChanges(), 32) && trace.done().size() > 16) { throw new TooManyChangesException(current(), trace, nrOfChanges); } - int maxTotalNrOfChanges = stats.maxTotalNrOfChanges(); - if (totalNrOfChanges > maxTotalNrOfChanges + Math.min(maxTotalNrOfChanges, 256)) { + if (totalNrOfChanges > stats.maxTotalNrOfChanges() + Math.min(stats.maxTotalNrOfChanges(), 256) && trace.done().size() > 8) { throw new TooManyChangesException(current(), trace, totalNrOfChanges); } } } @SuppressWarnings({"rawtypes", "unchecked"}) - private ObserverTrace trace(State pre, DefaultMap> observeds, Setable> setable, int changes) { + private ObserverTrace trace(State pre, DefaultMap> observeds, Setable> setable) { List traces = setable.get(mutable()); - ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), changes, // + Pair> p = Mutable.D_PARENT_CONTAINING.get(mutable()); + observeds = observeds.put((Observed) p.b(), observeds.get((Observed) p.b()).add(p.a())); + ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), nrOfChanges, // observeds.filter(e -> !e.getKey().isPlumbing()).flatMap(e -> e.getValue().map(m -> { m = m.dResolve(mutable()); return Entry.of(ObservedInstance.of(m, e.getKey()), pre.get(m, e.getKey())); From 062da94018c9181ebd944a79a079adfed00efe12 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 7 Dec 2023 12:50:51 +0100 Subject: [PATCH 012/179] remove trace --- src/main/java/org/modelingvalue/dclare/ObserverTrace.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 7019610e..848edd52 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -65,7 +65,6 @@ protected ObserverTrace(Mutable mutable, Observer observer, ObserverTrace pre this.backTrace = backTrace; this.done = done.addAll(back).addAll(backDone).addAll(previous != null ? previous.done.add(previous) : Set.of()); this.time = Instant.now(); - System.err.println("!!!!!!!!!!! " + this.done.size()); } public Instant time() { From 636a1f37daf02da9a86c6035be365bfa193c7112 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 7 Dec 2023 17:12:08 +0100 Subject: [PATCH 013/179] extra fixpoint group Priority --- .../dclare/ActionTransaction.java | 2 +- .../dclare/ObserverTransaction.java | 23 ++++++++++--------- .../org/modelingvalue/dclare/Priority.java | 6 +++-- .../dclare/UniverseTransaction.java | 6 ++--- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 23741e0d..30a298b0 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -175,7 +175,7 @@ private void trigger(O object, Observed observed) { for (Mutable m : e.getValue()) { Mutable target = m.dResolve((Mutable) object); if (!action().equals(observer) || !source.equals(target)) { - Priority priority = observer.fixpointGroup() == fixpointGroup() ? observer.initPriority() : Priority.OUTER; + Priority priority = observer.fixpointGroup() == fixpointGroup() ? observer.initPriority() : Priority.five; trigger(target, observer, priority); if (universeTransaction().getConfig().isTraceMutable()) { runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (TRIGGER " + target + "." + observer + ")")); diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index d4bf6d23..c9fd59be 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -43,7 +43,7 @@ public class ObserverTransaction extends ActionTransaction { private final Concurrent> constructions = Concurrent.of(); private final Concurrent> emptyMandatory = Concurrent.of(); private final Concurrent> changed = Concurrent.of(); - private final Concurrents> defer = new Concurrents<>(Priority.two); + private final Concurrents> defer = new Concurrents<>(Priority.INNER); private Pair throwable; private int nrOfChanges; @@ -68,7 +68,7 @@ protected State merge() { emptyMandatory.merge(); changed.merge(); defer.merge(); - Map cons = constructions.merge(); //TODO @WIM: why is this not done in the 'if' below? + Map cons = constructions.merge(); // The merge must be done after merge. if (throwable == null) { Set ch = changed.get(); observer().constructed().set(mutable(), cons); @@ -224,7 +224,8 @@ private ObserverTrace trace(State pre, DefaultMap> observ m = m.dResolve(mutable()); return Entry.of(ObservedInstance.of(m, e.getKey()), pre.get(m, e.getKey())); })).asMap(e -> e), // - pre.diff(current(), o -> o instanceof Mutable, s -> s instanceof Observed && !s.isPlumbing()).flatMap(e1 -> e1.getValue().map(e2 -> Entry.of(ObservedInstance.of((Mutable) e1.getKey(), (Observed) e2.getKey()), e2.getValue().b()))).asMap(e -> e)); + pre.diff(current(), o -> o instanceof Mutable, s -> s instanceof Observed && !s.isPlumbing()).// + flatMap(e1 -> e1.getValue().map(e2 -> Entry.of(ObservedInstance.of((Mutable) e1.getKey(), (Observed) e2.getKey()), e2.getValue().b()))).asMap(e -> e)); setable.set(mutable(), traces.append(trace)); return trace; } @@ -486,25 +487,25 @@ private boolean isChanged(O object, Observed many, ContainingCol } private , E> Priority added(O object, Observed observed, E added, boolean forward, boolean isNew) { - return added(object, observed, startState(Priority.two), state(), added, forward) ? Priority.two : // + return added(object, observed, startState(Priority.INNER), state(), added, forward) ? Priority.INNER : // becameDerived(observed, added, startState(Priority.three), current()) ? Priority.three : // (isNew && added(object, observed, startState(), startState(Priority.four), added, forward)) ? Priority.four : // - added(object, observed, preStartState(Priority.five).raw(), startState(Priority.five), added, forward) ? Priority.five : null; + added(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), added, forward) ? Priority.OUTER : null; } private , E> Priority removed(O object, Observed observed, E removed, boolean forward, boolean isNew) { - return removed(object, observed, startState(Priority.two), state(), removed, forward) ? Priority.two : // + return removed(object, observed, startState(Priority.INNER), state(), removed, forward) ? Priority.INNER : // (isNew && removed(object, observed, startState(), startState(Priority.four), removed, forward)) ? Priority.four : // - becameContained(observed, removed, startState(Priority.four), startState(Priority.two)) ? Priority.four : // - removed(object, observed, preStartState(Priority.five).raw(), startState(Priority.five), removed, forward) ? Priority.five : null; + becameContained(observed, removed, startState(Priority.four), startState(Priority.INNER)) ? Priority.four : // + removed(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), removed, forward) ? Priority.OUTER : null; } private Priority changed(O object, Observed observed, T pre, T post, boolean forward, boolean isNew) { - return changed(object, observed, startState(Priority.two), state(), pre, post, forward) ? Priority.two : // + return changed(object, observed, startState(Priority.INNER), state(), pre, post, forward) ? Priority.INNER : // becameDerived(observed, post, startState(Priority.three), current()) ? Priority.three : // (isNew && changed(object, observed, startState(), startState(Priority.four), pre, post, forward)) ? Priority.four : // - becameContained(observed, pre, startState(Priority.four), startState(Priority.two)) ? Priority.four : // - changed(object, observed, preStartState(Priority.five).raw(), startState(Priority.five), pre, post, forward) ? Priority.five : null; + becameContained(observed, pre, startState(Priority.four), startState(Priority.INNER)) ? Priority.four : // + changed(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), pre, post, forward) ? Priority.OUTER : null; } private , E> boolean added(O object, Observed observed, IState preState, IState postState, E added, boolean forward) { diff --git a/src/main/java/org/modelingvalue/dclare/Priority.java b/src/main/java/org/modelingvalue/dclare/Priority.java index 17ecff20..b15a94cd 100644 --- a/src/main/java/org/modelingvalue/dclare/Priority.java +++ b/src/main/java/org/modelingvalue/dclare/Priority.java @@ -36,12 +36,14 @@ public enum Priority implements LeafModifier, Internable { four, - five; // Deferred scheduled outer + five, // For Fixpoint Groups + + six; // Deferred scheduled outer // To prevent Array allocations each time Priority.values() is called. public static final Priority[] ALL = Priority.values(); public static final Priority INNER = two; - public static final Priority OUTER = five; + public static final Priority OUTER = six; public final static class Queued extends Setable> { diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 622f8e56..6f05a3ac 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -175,8 +175,8 @@ public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig con universeStatistics = new UniverseStatistics(this); start(universe, null); preState = startState; - preStartStates = new MutableStates(Priority.two, () -> createMutableState(emptyState)); - startStates = new MutableStates(Priority.two, () -> createMutableState(emptyState)); + preStartStates = new MutableStates(Priority.INNER, () -> createMutableState(emptyState)); + startStates = new MutableStates(Priority.INNER, () -> createMutableState(emptyState)); List states = List.of(); for (int i = 0; i < startStates.length(); i++) { Priority p = startStates.priority(i); @@ -419,7 +419,7 @@ protected State run(State state) { if (!killed && orphansDetected.get() == Boolean.TRUE) { preOrphansState = startState(Priority.INNER).preState(); state = trigger(state, universe(), clearOrphans, Priority.INNER); - priority = Priority.two; + priority = Priority.INNER; } else { priority = killed ? null : hasQueued(state); if (!killed && (priority == null || priority == Priority.OUTER) && orphansDetected.get() == null) { From c98ecbf8f013c78d7421a458e36ec7f5265b1670 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Thu, 7 Dec 2023 23:26:50 +0100 Subject: [PATCH 014/179] also adjust test classes --- .../modelingvalue/dclare/test/support/CommunicationHelper.java | 2 +- .../java/org/modelingvalue/dclare/test/support/ModelMaker.java | 2 +- src/test/java/org/modelingvalue/dclare/test/support/Shared.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java index a638d418..6cf033bc 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java @@ -17,7 +17,7 @@ import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; -import org.modelingvalue.collections.util.ContextThread.ContextPool; +import org.modelingvalue.collections.util.ContextPool; import org.modelingvalue.collections.util.MutationWrapper; import org.modelingvalue.collections.util.TraceTimer; import org.modelingvalue.dclare.sync.DeltaAdaptor; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index 4194d85d..82abf2a2 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -25,7 +25,7 @@ import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Concurrent; import org.modelingvalue.collections.util.ContextThread; -import org.modelingvalue.collections.util.ContextThread.ContextPool; +import org.modelingvalue.collections.util.ContextPool; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.dclare.Constant; import org.modelingvalue.dclare.DclareConfig; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java index 85c16175..b5dcd3c1 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java @@ -16,7 +16,7 @@ package org.modelingvalue.dclare.test.support; import org.modelingvalue.collections.util.ContextThread; -import org.modelingvalue.collections.util.ContextThread.ContextPool; +import org.modelingvalue.collections.util.ContextPool; import org.modelingvalue.collections.util.TraceTimer; import org.modelingvalue.dclare.State; import org.modelingvalue.dclare.UniverseTransaction; From 4d6fd79f89fe4f8dabdc68963a134ac36c951726 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 12 Dec 2023 12:15:46 +0100 Subject: [PATCH 015/179] schedule init fixpoint group based --- src/main/java/org/modelingvalue/dclare/Mutable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index f4ef930f..645873fe 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -42,7 +42,7 @@ public interface Mutable extends TransactionClass { @SuppressWarnings({"rawtypes", "unchecked"}) Setable>> D_OBSERVERS = Setable.of("D_OBSERVERS", Set.of(), (tx, obj, pre, post) -> Setable.>, Observer> diff(pre, post, // - added -> added.trigger(obj), // + added -> added.trigger(obj, added.fixpointGroup() == FixpointGroup.DEFAULT ? added.initPriority() : Priority.five), // removed -> { })); From 997a5b5241772b719f3e9321c2c9a2d443440316 Mon Sep 17 00:00:00 2001 From: automation Date: Tue, 12 Dec 2023 14:02:21 +0000 Subject: [PATCH 016/179] [no-ci] updated by mvgplugin --- .../org/modelingvalue/dclare/FixpointGroup.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java index a23b8d7a..93f4805f 100644 --- a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java +++ b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java @@ -1,3 +1,18 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus, Ronald Krijgsheld ~ +// Contributors: ~ +// Arjan Kok, Carel Bast ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare; public interface FixpointGroup { From 3526150cad1385ce485d5cb580bc07e6af058d5f Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 14 Dec 2023 12:03:38 +0100 Subject: [PATCH 017/179] cleanup when to much equal hashes in constants --- .../modelingvalue/dclare/ConstantState.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index c7d680fe..06570057 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -28,6 +28,8 @@ import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.QualifiedSet; +import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.impl.HashCollectionImpl; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.collections.util.StringUtil; @@ -320,6 +322,18 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, QualifiedSet prev = state.get(); Constants constants = prev.get(object); if (constants == null) { + Set allWithEqualhash = prev.allWithEqualhash(object); + if (allWithEqualhash.size() >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL - 2) { + int i = 0; + for (Constants c : allWithEqualhash) { + if (!(c.ref instanceof Constants.DurableRef)) { + prev = removeConstants(c); + if (++i >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL / 2) { + break; + } + } + } + } object = leafTransaction.state().canonical(object); constants = new Constants<>(object, referenceType, queue); QualifiedSet next = prev.add(constants); @@ -342,7 +356,7 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, return constants; } - private void removeConstants(Constants constants) { + private QualifiedSet removeConstants(Constants constants) { QualifiedSet prev = state.get(); Object object = constants.object(); constants = prev.get(object); @@ -351,11 +365,13 @@ private void removeConstants(Constants constants) { while (!state.compareAndSet(prev, next)) { prev = state.get(); if (prev.get(object) == null) { - return; + return prev; } next = prev.removeKey(object); } + return next; } + return prev; } private static enum ReferenceType { From 513a9ad0e5b6dfbaf7bf362c8962490e4b6d1399 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 8 Jan 2024 11:17:04 +0100 Subject: [PATCH 018/179] class cast exception fix --- .../java/org/modelingvalue/dclare/ObserverTransaction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index c9fd59be..f9c93a72 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -218,7 +218,9 @@ protected void trace(State pre, DefaultMap> observeds) { private ObserverTrace trace(State pre, DefaultMap> observeds, Setable> setable) { List traces = setable.get(mutable()); Pair> p = Mutable.D_PARENT_CONTAINING.get(mutable()); - observeds = observeds.put((Observed) p.b(), observeds.get((Observed) p.b()).add(p.a())); + if (p.b() instanceof Observed) { + observeds = observeds.put((Observed) p.b(), observeds.get((Observed) p.b()).add(p.a())); + } ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), nrOfChanges, // observeds.filter(e -> !e.getKey().isPlumbing()).flatMap(e -> e.getValue().map(m -> { m = m.dResolve(mutable()); From ee7d93f0c7afa4e12b3cb924744d76110d241fad Mon Sep 17 00:00:00 2001 From: automation Date: Mon, 8 Jan 2024 10:18:04 +0000 Subject: [PATCH 019/179] [no-ci] updated by mvgplugin --- .github/dependabot.yml | 2 +- build.gradle.kts | 2 +- gradle.properties | 2 +- settings.gradle.kts | 2 +- .../org/modelingvalue/dclare/AbstractDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Action.java | 2 +- src/main/java/org/modelingvalue/dclare/ActionInstance.java | 2 +- src/main/java/org/modelingvalue/dclare/ActionTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Constant.java | 2 +- src/main/java/org/modelingvalue/dclare/ConstantState.java | 2 +- src/main/java/org/modelingvalue/dclare/Construction.java | 2 +- src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/DclareConfig.java | 2 +- src/main/java/org/modelingvalue/dclare/DclareTrace.java | 2 +- src/main/java/org/modelingvalue/dclare/Derivation.java | 2 +- .../java/org/modelingvalue/dclare/DerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Direction.java | 2 +- src/main/java/org/modelingvalue/dclare/Feature.java | 2 +- src/main/java/org/modelingvalue/dclare/FeatureModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/FixpointGroup.java | 2 +- src/main/java/org/modelingvalue/dclare/Getable.java | 2 +- src/main/java/org/modelingvalue/dclare/IState.java | 2 +- src/main/java/org/modelingvalue/dclare/IdentityDerivation.java | 2 +- .../org/modelingvalue/dclare/IdentityDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Imperative.java | 2 +- .../java/org/modelingvalue/dclare/ImperativeTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/JsonToState.java | 2 +- src/main/java/org/modelingvalue/dclare/LazyDerivation.java | 2 +- .../org/modelingvalue/dclare/LazyDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Leaf.java | 2 +- src/main/java/org/modelingvalue/dclare/LeafModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/LeafTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/MatchInfo.java | 2 +- src/main/java/org/modelingvalue/dclare/Mutable.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableClass.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableState.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Newable.java | 2 +- src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java | 2 +- .../java/org/modelingvalue/dclare/NonInternableObserver.java | 2 +- src/main/java/org/modelingvalue/dclare/Observed.java | 2 +- src/main/java/org/modelingvalue/dclare/ObservedInstance.java | 2 +- src/main/java/org/modelingvalue/dclare/Observer.java | 2 +- src/main/java/org/modelingvalue/dclare/ObserverTrace.java | 2 +- src/main/java/org/modelingvalue/dclare/ObserverTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/OneShot.java | 2 +- src/main/java/org/modelingvalue/dclare/Priority.java | 2 +- src/main/java/org/modelingvalue/dclare/ReadOnly.java | 2 +- src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/ReusableTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Setable.java | 2 +- src/main/java/org/modelingvalue/dclare/SetableModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/State.java | 2 +- src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java | 2 +- src/main/java/org/modelingvalue/dclare/StateMap.java | 2 +- src/main/java/org/modelingvalue/dclare/StateMergeHandler.java | 2 +- src/main/java/org/modelingvalue/dclare/StateToJson.java | 2 +- src/main/java/org/modelingvalue/dclare/This.java | 2 +- src/main/java/org/modelingvalue/dclare/Transaction.java | 2 +- src/main/java/org/modelingvalue/dclare/TransactionClass.java | 2 +- src/main/java/org/modelingvalue/dclare/TransactionId.java | 2 +- src/main/java/org/modelingvalue/dclare/TypeWrapper.java | 2 +- src/main/java/org/modelingvalue/dclare/Universe.java | 2 +- src/main/java/org/modelingvalue/dclare/UniverseStatistics.java | 2 +- src/main/java/org/modelingvalue/dclare/UniverseTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java | 2 +- .../modelingvalue/dclare/ex/CycleInParentChainException.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java | 2 +- .../org/modelingvalue/dclare/ex/EmptyMandatoryException.java | 2 +- .../org/modelingvalue/dclare/ex/NonDeterministicException.java | 2 +- .../java/org/modelingvalue/dclare/ex/OutOfScopeException.java | 2 +- .../org/modelingvalue/dclare/ex/ReferencedOrphanException.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyChangesException.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyObservedException.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyObserversException.java | 2 +- .../java/org/modelingvalue/dclare/ex/TransactionException.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/Converters.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/JsonIC.java | 2 +- .../java/org/modelingvalue/dclare/sync/SerialisationPool.java | 2 +- .../java/org/modelingvalue/dclare/sync/SerializationHelper.java | 2 +- .../modelingvalue/dclare/sync/SerializationHelperWithPool.java | 2 +- .../org/modelingvalue/dclare/sync/SocketSyncConnection.java | 2 +- .../java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java | 2 +- .../org/modelingvalue/dclare/sync/SyncConnectionHandler.java | 2 +- .../org/modelingvalue/dclare/sync/UniverseSynchronizer.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/Util.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java | 2 +- .../java/org/modelingvalue/dclare/test/CommunicationTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/DclareTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/JsonICTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/NewableTests.java | 2 +- .../org/modelingvalue/dclare/test/SerialisationPoolTests.java | 2 +- .../modelingvalue/dclare/test/support/CommunicationHelper.java | 2 +- .../modelingvalue/dclare/test/support/CommunicationPeer.java | 2 +- .../java/org/modelingvalue/dclare/test/support/Fibonacci.java | 2 +- .../java/org/modelingvalue/dclare/test/support/ModelMaker.java | 2 +- .../org/modelingvalue/dclare/test/support/OneShotTests.java | 2 +- .../java/org/modelingvalue/dclare/test/support/PeerTester.java | 2 +- src/test/java/org/modelingvalue/dclare/test/support/Shared.java | 2 +- .../org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java | 2 +- .../java/org/modelingvalue/dclare/test/support/TestMutable.java | 2 +- .../org/modelingvalue/dclare/test/support/TestMutableClass.java | 2 +- .../java/org/modelingvalue/dclare/test/support/TestNewable.java | 2 +- .../org/modelingvalue/dclare/test/support/TestNewableClass.java | 2 +- .../org/modelingvalue/dclare/test/support/TestObserved.java | 2 +- .../org/modelingvalue/dclare/test/support/TestScheduler.java | 2 +- .../org/modelingvalue/dclare/test/support/TestUniverse.java | 2 +- 109 files changed, 109 insertions(+), 109 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0dfe9c61..1d2e354a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ ## ~ ## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ ## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/build.gradle.kts b/build.gradle.kts index 333f1a66..8773cd2b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/gradle.properties b/gradle.properties index 47258904..aa9d9a22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ ## ~ ## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ ## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/settings.gradle.kts b/settings.gradle.kts index 8b5c355a..503d097e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 29fe4d31..3d6648e5 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index 1374e405..036f1fa9 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ActionInstance.java b/src/main/java/org/modelingvalue/dclare/ActionInstance.java index d650b18b..bc3ead64 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ActionInstance.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 30a298b0..1b18eca3 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index f1626aab..9c736d7b 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 06570057..92221350 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Construction.java b/src/main/java/org/modelingvalue/dclare/Construction.java index 2b9c64dd..e6bfb497 100644 --- a/src/main/java/org/modelingvalue/dclare/Construction.java +++ b/src/main/java/org/modelingvalue/dclare/Construction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java index 2eec9219..018cb5ff 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DclareConfig.java b/src/main/java/org/modelingvalue/dclare/DclareConfig.java index c63bb9cc..28f56f63 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareConfig.java +++ b/src/main/java/org/modelingvalue/dclare/DclareConfig.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DclareTrace.java b/src/main/java/org/modelingvalue/dclare/DclareTrace.java index 153cfdf4..821d5d31 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareTrace.java +++ b/src/main/java/org/modelingvalue/dclare/DclareTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Derivation.java b/src/main/java/org/modelingvalue/dclare/Derivation.java index fc937b3f..34ee88b5 100644 --- a/src/main/java/org/modelingvalue/dclare/Derivation.java +++ b/src/main/java/org/modelingvalue/dclare/Derivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java index 06cce57d..394977cc 100644 --- a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Direction.java b/src/main/java/org/modelingvalue/dclare/Direction.java index b5ec7750..88229a1a 100644 --- a/src/main/java/org/modelingvalue/dclare/Direction.java +++ b/src/main/java/org/modelingvalue/dclare/Direction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Feature.java b/src/main/java/org/modelingvalue/dclare/Feature.java index 34e5a83e..497b5e7e 100644 --- a/src/main/java/org/modelingvalue/dclare/Feature.java +++ b/src/main/java/org/modelingvalue/dclare/Feature.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java index 261142d7..31df231c 100644 --- a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java +++ b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java index 93f4805f..63689b9f 100644 --- a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java +++ b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Getable.java b/src/main/java/org/modelingvalue/dclare/Getable.java index 95c89fe4..7b46c6c0 100644 --- a/src/main/java/org/modelingvalue/dclare/Getable.java +++ b/src/main/java/org/modelingvalue/dclare/Getable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IState.java b/src/main/java/org/modelingvalue/dclare/IState.java index 19273c36..153a8617 100644 --- a/src/main/java/org/modelingvalue/dclare/IState.java +++ b/src/main/java/org/modelingvalue/dclare/IState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java index 728f309d..b099e5cc 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 713d3dd7..da89bfa0 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Imperative.java b/src/main/java/org/modelingvalue/dclare/Imperative.java index bfd8bb7f..0092578a 100644 --- a/src/main/java/org/modelingvalue/dclare/Imperative.java +++ b/src/main/java/org/modelingvalue/dclare/Imperative.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 1b896da7..68974869 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/JsonToState.java b/src/main/java/org/modelingvalue/dclare/JsonToState.java index 0764ac22..6dbeb6e6 100644 --- a/src/main/java/org/modelingvalue/dclare/JsonToState.java +++ b/src/main/java/org/modelingvalue/dclare/JsonToState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java index b05161a8..787a1373 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java index 409c818e..0e092b3e 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Leaf.java b/src/main/java/org/modelingvalue/dclare/Leaf.java index 6df1b620..7a46032e 100644 --- a/src/main/java/org/modelingvalue/dclare/Leaf.java +++ b/src/main/java/org/modelingvalue/dclare/Leaf.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LeafModifier.java b/src/main/java/org/modelingvalue/dclare/LeafModifier.java index 6c3aa05b..864ecc8e 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/LeafModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index c476c3af..d807be84 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index fa628833..738a5c8f 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 533dadc9..61c32624 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableClass.java b/src/main/java/org/modelingvalue/dclare/MutableClass.java index 3a2e93d7..8cbf535f 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableClass.java +++ b/src/main/java/org/modelingvalue/dclare/MutableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableState.java b/src/main/java/org/modelingvalue/dclare/MutableState.java index 3bdd1f54..c4a7cb46 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableState.java +++ b/src/main/java/org/modelingvalue/dclare/MutableState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index 4614a1ef..b7e45d1f 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Newable.java b/src/main/java/org/modelingvalue/dclare/Newable.java index 44cbd476..c255c678 100644 --- a/src/main/java/org/modelingvalue/dclare/Newable.java +++ b/src/main/java/org/modelingvalue/dclare/Newable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java index 28a7f7a9..5b5ac2f4 100644 --- a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java index a367c101..75950c82 100644 --- a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Observed.java b/src/main/java/org/modelingvalue/dclare/Observed.java index 0143e817..0c5875ed 100644 --- a/src/main/java/org/modelingvalue/dclare/Observed.java +++ b/src/main/java/org/modelingvalue/dclare/Observed.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java index 2e939d82..3431686f 100644 --- a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index 377d0ca1..1d720412 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 848edd52..159d90e3 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index f9c93a72..e93b2b47 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index edde06b8..543d93c5 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Priority.java b/src/main/java/org/modelingvalue/dclare/Priority.java index b15a94cd..db664b78 100644 --- a/src/main/java/org/modelingvalue/dclare/Priority.java +++ b/src/main/java/org/modelingvalue/dclare/Priority.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnly.java b/src/main/java/org/modelingvalue/dclare/ReadOnly.java index ddf34ca6..66438262 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnly.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnly.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index 5dd49bf8..17c8c845 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java index 05887a56..838ed27a 100644 --- a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index bfcb3a95..c63711f3 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/SetableModifier.java b/src/main/java/org/modelingvalue/dclare/SetableModifier.java index 010d2eb6..98d249af 100644 --- a/src/main/java/org/modelingvalue/dclare/SetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/SetableModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index a152e886..13a37c9f 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java index 5787ed9a..8579449c 100644 --- a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateMap.java b/src/main/java/org/modelingvalue/dclare/StateMap.java index f5d9a09f..7626b1dc 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMap.java +++ b/src/main/java/org/modelingvalue/dclare/StateMap.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java index 9cc4eacc..4bbbc22e 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index cf086850..4a470017 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/This.java b/src/main/java/org/modelingvalue/dclare/This.java index b64b3e55..098c4044 100644 --- a/src/main/java/org/modelingvalue/dclare/This.java +++ b/src/main/java/org/modelingvalue/dclare/This.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Transaction.java b/src/main/java/org/modelingvalue/dclare/Transaction.java index dab3c1d6..aab74a2b 100644 --- a/src/main/java/org/modelingvalue/dclare/Transaction.java +++ b/src/main/java/org/modelingvalue/dclare/Transaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TransactionClass.java b/src/main/java/org/modelingvalue/dclare/TransactionClass.java index 65035d02..d95ce488 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionClass.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TransactionId.java b/src/main/java/org/modelingvalue/dclare/TransactionId.java index 0e26df90..664d6a81 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionId.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionId.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java index f5921fe4..92913971 100644 --- a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java +++ b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index 4534640f..eb632e5d 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java index 770ea6ea..a280c655 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index cf373cb1..0e25a158 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java index 0b7613ce..13059ef8 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java index bbe3a323..fe22b2d9 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java index ab22b962..59ca0b28 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java index 8a21aa47..c314b51f 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java index 41b84772..b2cbe19f 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java index 20617ffd..44e86a10 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java index 30fb189b..5546929a 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java index 7c5705e9..f9ed913f 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java index d5df0fab..ba872ce0 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java index 0fe74fce..72b5fbb7 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java index b08c6b23..107e6cd9 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java index dbf82f68..df231e41 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/Converters.java b/src/main/java/org/modelingvalue/dclare/sync/Converters.java index dddd7998..0e0fb0bf 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Converters.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Converters.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java index b7ed01d8..3c6f079a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java +++ b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java index ea0cea6a..1d91a832 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java +++ b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java index 41e03450..298e7d5e 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java index 6d603497..4359df54 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java index 6cbbade3..6b857dd9 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java index 929e57f6..0f6b5ad0 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java index a54c49dd..a40aa692 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java index 69311bfc..3d323823 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java index 84c426e5..8995977c 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/Util.java b/src/main/java/org/modelingvalue/dclare/sync/Util.java index 9b598529..bc053b7a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Util.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Util.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java index de733cfd..81e02c36 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java +++ b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java index afcb0d78..8042a15d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java index 073ba3eb..a8251f78 100644 --- a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java index 359397b7..94151483 100644 --- a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java index 23da1cd3..4b0650a8 100644 --- a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java index f7315da8..89c3728e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java index 6cf033bc..1164d187 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java index a2896be7..b54f7fe6 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java index 4e9e3d95..cfcb22da 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index 82abf2a2..1fa3b7a9 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java index 9b6df564..7fe62d3a 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java index b10c3bc6..6196f360 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java index b5dcd3c1..13f15148 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java index 7084a3ad..ead81301 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java index e9173433..d0b1af6e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java index b16ec491..dc34f553 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java index 2615232f..71f65057 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java index 83323c8f..33d54936 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java index 825874a0..33ecf2f1 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java index 9fad4ba9..1ebfe3e0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java index 076a51b0..da862794 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2023 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ From de73c36ed59e23eb2991e346a9b65a5b84ad861c Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 16 Jan 2024 16:10:04 +0100 Subject: [PATCH 020/179] Do not match (only replace if already matched) in may non-containment observed. --- .../org/modelingvalue/dclare/MatchInfo.java | 20 +++++++++++++------ .../dclare/ObserverTransaction.java | 10 +++++----- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index 738a5c8f..04428886 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -28,17 +28,21 @@ public class MatchInfo { private final Construction initialConstruction; private final boolean removed; private final Object identity; + private final boolean containment; + private final boolean many; private QualifiedSet allDerivations; @SuppressWarnings("rawtypes") - public static MatchInfo of(Newable newable, ObserverTransaction otx, Mutable object, Observed observed) { - return new MatchInfo(newable, otx, object, observed); + public static MatchInfo of(Newable newable, ObserverTransaction otx, Mutable object, Observed observed, boolean many) { + return new MatchInfo(newable, otx, object, observed, many); } @SuppressWarnings({"rawtypes", "unchecked"}) - private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Observed observed) { + private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Observed observed, boolean many) { this.newable = newable; + this.containment = observed.containment(); + this.many = many; ConstantState constants = otx.universeTransaction().tmpConstants(); removed = otx.startState(Priority.three).get(newable, Mutable.D_PARENT_CONTAINING) == null && // otx.preStartState(Priority.OUTER).getRaw(newable, Mutable.D_PARENT_CONTAINING) != null; @@ -47,7 +51,7 @@ private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Obse identity = constants.get(otx, newable, Newable.D_IDENTITY, n -> { if (!removed && (isDirect() || isDerived())) { State state = otx.current(); - if (observed.containment()) { + if (containment) { state = state.set(newable, Mutable.D_PARENT_CONTAINING, Pair.of(object, observed)); } return state.deriveIdentity(() -> n.dIdentity(), otx.depth(), otx.mutable(), constants); @@ -58,8 +62,12 @@ private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Obse } public boolean mustReplace(MatchInfo replaced) { - return canBeReplacing() && replaced.canBeReplaced() && Objects.equals(identity(), replaced.identity()) && // - !replaced.allDerivations.anyMatch(c -> (isDerived() && initialConstruction.reason().equals(c.reason())) || c.hasSource(newable)); + if (!many || containment) { + return canBeReplacing() && replaced.canBeReplaced() && Objects.equals(identity(), replaced.identity()) && // + !replaced.allDerivations.anyMatch(c -> (isDerived() && initialConstruction.reason().equals(c.reason())) || c.hasSource(newable)); + } else { + return newable.equals(replaced.newable().dReplacing()); + } } protected void setAllDerivations(MatchInfo other) { diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index e93b2b47..a3ea1e8a 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -576,8 +576,8 @@ private String deferPriorityName() { @SuppressWarnings({"rawtypes", "unchecked"}) private Object singleMatch(Mutable object, Observed observed, Object before, Object after) { if (after instanceof Newable && before instanceof Newable && ((Newable) after).dNewableType().equals(((Newable) before).dNewableType())) { - MatchInfo preInfo = MatchInfo.of((Newable) before, this, object, observed); - MatchInfo postInfo = MatchInfo.of((Newable) after, this, object, observed); + MatchInfo preInfo = MatchInfo.of((Newable) before, this, object, observed, false); + MatchInfo postInfo = MatchInfo.of((Newable) after, this, object, observed, false); if (preInfo.mustReplace(postInfo)) { replace(postInfo, preInfo); after = preInfo.newable(); @@ -593,7 +593,7 @@ private Object singleMatch(Mutable object, Observed observed, Object before, Obj found = true; break; } - MatchInfo valInfo = MatchInfo.of((Newable) val, this, object, cont); + MatchInfo valInfo = MatchInfo.of((Newable) val, this, object, cont, false); if (valInfo.identity() != null && valInfo.mustReplace(postInfo)) { found = true; replace(postInfo, valInfo); @@ -633,7 +633,7 @@ private Object manyMatch(Mutable object, Observed observed, ContainingCollection } } if (infos == null) { - infos = Collection.concat(befores, afters).distinct().filter(Newable.class).map(n -> MatchInfo.of(n, this, object, observed)).asQualifiedSet(MatchInfo::newable); + infos = Collection.concat(befores, afters).distinct().filter(Newable.class).map(n -> MatchInfo.of(n, this, object, observed, true)).asQualifiedSet(MatchInfo::newable); postInfo = infos.get((Newable) after); } MatchInfo preInfo = infos.get((Newable) before); @@ -658,7 +658,7 @@ private Object manyMatch(Mutable object, Observed observed, ContainingCollection befores = befores.replaceFirst(before, after); replace(preInfo, postInfo); break; - } else if (observed.containment() && universeTransaction().getConfig().isTraceMatching()) { + } else if (universeTransaction().getConfig().isTraceMatching()) { MatchInfo finalPostInfo = postInfo; runNonObserving(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable() + "." + observer() + " (" + preInfo + "!=" + finalPostInfo + ")")); } From 0aa47b0562b5a8f6bcb96618ed763faae487f99c Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 8 Feb 2024 08:05:03 +0100 Subject: [PATCH 021/179] atomic derivation --- .../dclare/AbstractDerivationTransaction.java | 77 +++++++++++++++---- 1 file changed, 61 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 3d6648e5..d1fcdd4e 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -30,11 +30,13 @@ public abstract class AbstractDerivationTransaction extends ReadOnlyTransaction { @SuppressWarnings("rawtypes") - protected static final Context>> DERIVED = Context.of(Set.of()); + protected static final Context>> DERIVED = Context.of(Set.of()); @SuppressWarnings("rawtypes") - protected static final Context> DERIVER = Context.of(null); - private static final Context DERIVE = Context.of(true); - private static final Context INDENT = Context.of(0); + protected static final Context> DERIVER = Context.of(null); + @SuppressWarnings("rawtypes") + private static final Context DERIVED_VALUE = Context.of(null); + private static final Context DERIVE = Context.of(true); + private static final Context INDENT = Context.of(0); public static boolean isDeriving() { return !DERIVED.get().isEmpty(); @@ -84,13 +86,17 @@ protected T current(O object, Getable getable) { return derive(object, getable, nonDerived); } - @SuppressWarnings("rawtypes") + @SuppressWarnings({"rawtypes", "unchecked"}) private T derive(O object, Getable getable, T nonDerived) { if (doDeriveGet(object, getable, nonDerived)) { Observed observed = (Observed) getable; + DerivedValue outerDerivedValue = DERIVED_VALUE.get(); + boolean isDerived = outerDerivedValue != null && outerDerivedValue.isDerived(object, observed); ConstantState mem = memoization(object); Constant constant = observed.constant(); - if (!mem.isSet(this, object, constant)) { + if (isDerived && outerDerivedValue.isSet()) { + return outerDerivedValue.get(); + } else if (!mem.isSet(this, object, constant)) { if (Newable.D_ALL_DERIVATIONS.equals(observed) || Mutable.D_PARENT_CONTAINING.equals(observed)) { return nonDerived; } else { @@ -106,7 +112,8 @@ private T derive(O object, Getable getable, T nonDerived) { if (isTraceDerivation(object, observed)) { runNonDeriving(() -> System.err.println(tracePre(object) + ">>>> " + object + "." + observed)); } - INDENT.run(INDENT.get() + 1, () -> DERIVED.run(newDerived, () -> { + DerivedValue innerDerivedValue = new DerivedValue(object, observed); + INDENT.run(INDENT.get() + 1, () -> DERIVED.run(newDerived, () -> DERIVED_VALUE.run(innerDerivedValue, () -> { int i = 0; Set observers = ((Mutable) object).dAllDerivers(observed).asSet(); for (Observer observer : observers.filter(Observer::anonymous)) { @@ -115,7 +122,10 @@ private T derive(O object, Getable getable, T nonDerived) { for (Observer observer : observers.exclude(Observer::anonymous)) { runDeriver((Mutable) object, observed, observer, ++i); } - })); + if (innerDerivedValue.isSet()) { + setInMemoization(mem, object, observed, innerDerivedValue.get()); + } + }))); if (!mem.isSet(this, object, constant)) { if (isTraceDerivation(object, observed)) { INDENT.run(INDENT.get() + 1, () -> runNonDeriving(() -> System.err.println(tracePre(object) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); @@ -167,20 +177,27 @@ public void runNonDeriving(Runnable action) { @Override public T set(O object, Setable setable, T post) { if (doDeriveSet(object, setable)) { + Observed observed = (Observed) setable; + DerivedValue derivedValue = DERIVED_VALUE.get(); + boolean isDerived = derivedValue.isDerived(object, observed); ConstantState mem = memoization(object); - Constant constant = setable.constant(); - T pre = mem.isSet(this, object, constant) ? mem.get(this, object, constant) : getNonDerived(object, setable); - T result = match(mem, setable, pre, post); - setInMemoization(mem, object, setable, result); - if (isTraceDerivation(object, setable)) { + Constant constant = observed.constant(); + T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(this, object, constant) ? mem.get(this, object, constant) : getNonDerived(object, setable); + T result = match(mem, observed, pre, post); + if (isDerived) { + derivedValue.set(result); + } else { + setInMemoization(mem, object, observed, result); + } + if (isTraceDerivation(object, observed)) { runNonDeriving(() -> { Pair deriver = DERIVER.get(); - System.err.println(tracePre(object) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + setable + "=" + pre + "->" + result + ")"); + System.err.println(tracePre(object) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); }); } - if (setable.containment()) { + if (observed.containment()) { Setable. diff(pre, result, added -> { - setInMemoization(mem, added, Mutable.D_PARENT_CONTAINING, Pair.of((Mutable) object, (Setable) setable)); + setInMemoization(mem, added, Mutable.D_PARENT_CONTAINING, Pair.of((Mutable) object, (Setable) observed)); }, removed -> { }); } @@ -275,4 +292,32 @@ public int depth() { return INDENT.get(); } + protected static class DerivedValue extends Pair> { + private static final long serialVersionUID = -2566539820227398813L; + + private T value; + + protected DerivedValue(O a, Observed b) { + super(a, b); + } + + protected T get() { + return value == ConstantState.NULL ? null : value; + } + + @SuppressWarnings("unchecked") + protected void set(T value) { + this.value = value == null ? (T) ConstantState.NULL : value; + } + + protected boolean isSet() { + return value != null; + } + + protected boolean isDerived(O object, Observed observed) { + return a().equals(object) && b().equals(observed); + } + + } + } From 33484c5118a4add5cfb51bf1e9394772e06df51f Mon Sep 17 00:00:00 2001 From: automation Date: Thu, 8 Feb 2024 07:06:11 +0000 Subject: [PATCH 022/179] [no-ci] updated by mvgplugin --- .github/dependabot.yml | 33 +++++++++++-------- build.gradle.kts | 33 +++++++++++-------- gradle.properties | 33 +++++++++++-------- settings.gradle.kts | 33 +++++++++++-------- .../dclare/AbstractDerivationTransaction.java | 33 +++++++++++-------- .../java/org/modelingvalue/dclare/Action.java | 33 +++++++++++-------- .../modelingvalue/dclare/ActionInstance.java | 33 +++++++++++-------- .../dclare/ActionTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Constant.java | 33 +++++++++++-------- .../modelingvalue/dclare/ConstantState.java | 33 +++++++++++-------- .../modelingvalue/dclare/Construction.java | 33 +++++++++++-------- .../dclare/CoreSetableModifier.java | 33 +++++++++++-------- .../modelingvalue/dclare/DclareConfig.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/DclareTrace.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Derivation.java | 33 +++++++++++-------- .../dclare/DerivationTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Direction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Feature.java | 33 +++++++++++-------- .../modelingvalue/dclare/FeatureModifier.java | 33 +++++++++++-------- .../modelingvalue/dclare/FixpointGroup.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Getable.java | 33 +++++++++++-------- .../java/org/modelingvalue/dclare/IState.java | 33 +++++++++++-------- .../dclare/IdentityDerivation.java | 33 +++++++++++-------- .../dclare/IdentityDerivationTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Imperative.java | 33 +++++++++++-------- .../dclare/ImperativeTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/JsonToState.java | 33 +++++++++++-------- .../modelingvalue/dclare/LazyDerivation.java | 33 +++++++++++-------- .../dclare/LazyDerivationTransaction.java | 33 +++++++++++-------- .../java/org/modelingvalue/dclare/Leaf.java | 33 +++++++++++-------- .../modelingvalue/dclare/LeafModifier.java | 33 +++++++++++-------- .../modelingvalue/dclare/LeafTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/MatchInfo.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Mutable.java | 33 +++++++++++-------- .../modelingvalue/dclare/MutableClass.java | 33 +++++++++++-------- .../modelingvalue/dclare/MutableState.java | 33 +++++++++++-------- .../dclare/MutableTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Newable.java | 33 +++++++++++-------- .../dclare/NonCheckingObserver.java | 33 +++++++++++-------- .../dclare/NonInternableObserver.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Observed.java | 33 +++++++++++-------- .../dclare/ObservedInstance.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Observer.java | 33 +++++++++++-------- .../modelingvalue/dclare/ObserverTrace.java | 33 +++++++++++-------- .../dclare/ObserverTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/OneShot.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Priority.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/ReadOnly.java | 33 +++++++++++-------- .../dclare/ReadOnlyTransaction.java | 33 +++++++++++-------- .../dclare/ReusableTransaction.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Setable.java | 33 +++++++++++-------- .../modelingvalue/dclare/SetableModifier.java | 33 +++++++++++-------- .../java/org/modelingvalue/dclare/State.java | 33 +++++++++++-------- .../dclare/StateDeltaHandler.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/StateMap.java | 33 +++++++++++-------- .../dclare/StateMergeHandler.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/StateToJson.java | 33 +++++++++++-------- .../java/org/modelingvalue/dclare/This.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Transaction.java | 33 +++++++++++-------- .../dclare/TransactionClass.java | 33 +++++++++++-------- .../modelingvalue/dclare/TransactionId.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/TypeWrapper.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/Universe.java | 33 +++++++++++-------- .../dclare/UniverseStatistics.java | 33 +++++++++++-------- .../dclare/UniverseTransaction.java | 33 +++++++++++-------- .../dclare/ex/ConsistencyError.java | 33 +++++++++++-------- .../ex/CycleInParentChainException.java | 33 +++++++++++-------- .../modelingvalue/dclare/ex/DebugTrace.java | 33 +++++++++++-------- .../dclare/ex/EmptyMandatoryException.java | 33 +++++++++++-------- .../dclare/ex/NonDeterministicException.java | 33 +++++++++++-------- .../dclare/ex/OutOfScopeException.java | 33 +++++++++++-------- .../dclare/ex/ReferencedOrphanException.java | 33 +++++++++++-------- .../dclare/ex/ThrowableError.java | 33 +++++++++++-------- .../dclare/ex/TooManyChangesException.java | 33 +++++++++++-------- .../dclare/ex/TooManyObservedException.java | 33 +++++++++++-------- .../dclare/ex/TooManyObserversException.java | 33 +++++++++++-------- .../dclare/ex/TransactionException.java | 33 +++++++++++-------- .../modelingvalue/dclare/sync/Converters.java | 33 +++++++++++-------- .../dclare/sync/DeltaAdaptor.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/sync/JsonIC.java | 33 +++++++++++-------- .../dclare/sync/SerialisationPool.java | 33 +++++++++++-------- .../dclare/sync/SerializationHelper.java | 33 +++++++++++-------- .../sync/SerializationHelperWithPool.java | 33 +++++++++++-------- .../dclare/sync/SocketSyncConnection.java | 33 +++++++++++-------- .../dclare/sync/SupplierAndConsumer.java | 33 +++++++++++-------- .../dclare/sync/SyncConnectionHandler.java | 33 +++++++++++-------- .../dclare/sync/UniverseSynchronizer.java | 33 +++++++++++-------- .../org/modelingvalue/dclare/sync/Util.java | 33 +++++++++++-------- .../modelingvalue/dclare/sync/WorkDaemon.java | 33 +++++++++++-------- .../dclare/test/CommunicationTests.java | 33 +++++++++++-------- .../dclare/test/DclareTests.java | 33 +++++++++++-------- .../dclare/test/JsonICTests.java | 33 +++++++++++-------- .../dclare/test/NewableTests.java | 33 +++++++++++-------- .../dclare/test/SerialisationPoolTests.java | 33 +++++++++++-------- .../test/support/CommunicationHelper.java | 33 +++++++++++-------- .../test/support/CommunicationPeer.java | 33 +++++++++++-------- .../dclare/test/support/Fibonacci.java | 33 +++++++++++-------- .../dclare/test/support/ModelMaker.java | 33 +++++++++++-------- .../dclare/test/support/OneShotTests.java | 33 +++++++++++-------- .../dclare/test/support/PeerTester.java | 33 +++++++++++-------- .../dclare/test/support/Shared.java | 33 +++++++++++-------- .../dclare/test/support/TestDeltaAdaptor.java | 33 +++++++++++-------- .../dclare/test/support/TestMutable.java | 33 +++++++++++-------- .../dclare/test/support/TestMutableClass.java | 33 +++++++++++-------- .../dclare/test/support/TestNewable.java | 33 +++++++++++-------- .../dclare/test/support/TestNewableClass.java | 33 +++++++++++-------- .../dclare/test/support/TestObserved.java | 33 +++++++++++-------- .../dclare/test/support/TestScheduler.java | 33 +++++++++++-------- .../dclare/test/support/TestUniverse.java | 33 +++++++++++-------- 109 files changed, 2071 insertions(+), 1526 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1d2e354a..ea7e9c02 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,17 +1,22 @@ -##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -## ~ -## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -## Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -## an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -## specific language governing permissions and limitations under the License. ~ -## ~ -## Maintainers: ~ -## Wim Bast, Tom Brus, Ronald Krijgsheld ~ -## Contributors: ~ -## Arjan Kok, Carel Bast ~ -##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## ~ +## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +## Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +## an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +## specific language governing permissions and limitations under the License. ~ +## ~ +## Maintainers: ~ +## Wim Bast, Tom Brus ~ +## ~ +## Contributors: ~ +## Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +## --------------------------------------------------------------------------------------------------------------------- ~ +## In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +## Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +## but also our friend. "He will live on in many of the lines of code you see below." ~ +##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ version: 2 updates: diff --git a/build.gradle.kts b/build.gradle.kts index 8773cd2b..02f98aa6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ defaultTasks("mvgCorrector", "test", "publish", "mvgTagger") diff --git a/gradle.properties b/gradle.properties index aa9d9a22..56b71b4d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,22 @@ -##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -## ~ -## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -## Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -## an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -## specific language governing permissions and limitations under the License. ~ -## ~ -## Maintainers: ~ -## Wim Bast, Tom Brus, Ronald Krijgsheld ~ -## Contributors: ~ -## Arjan Kok, Carel Bast ~ -##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## ~ +## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +## Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +## an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +## specific language governing permissions and limitations under the License. ~ +## ~ +## Maintainers: ~ +## Wim Bast, Tom Brus ~ +## ~ +## Contributors: ~ +## Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +## --------------------------------------------------------------------------------------------------------------------- ~ +## In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +## Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +## but also our friend. "He will live on in many of the lines of code you see below." ~ +##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # suppress inspection "UnusedProperty" for whole file group = org.modelingvalue diff --git a/settings.gradle.kts b/settings.gradle.kts index 503d097e..eb29d1af 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rootProject.name = "dclare" diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index d1fcdd4e..aece1320 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index 036f1fa9..8b3d981f 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ActionInstance.java b/src/main/java/org/modelingvalue/dclare/ActionInstance.java index bc3ead64..293c4150 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ActionInstance.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 1b18eca3..00df861a 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index 9c736d7b..2e37c61b 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 92221350..61854bef 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Construction.java b/src/main/java/org/modelingvalue/dclare/Construction.java index e6bfb497..eaad3d90 100644 --- a/src/main/java/org/modelingvalue/dclare/Construction.java +++ b/src/main/java/org/modelingvalue/dclare/Construction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java index 018cb5ff..a9803059 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/DclareConfig.java b/src/main/java/org/modelingvalue/dclare/DclareConfig.java index 28f56f63..5d741b29 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareConfig.java +++ b/src/main/java/org/modelingvalue/dclare/DclareConfig.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/DclareTrace.java b/src/main/java/org/modelingvalue/dclare/DclareTrace.java index 821d5d31..b126c564 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareTrace.java +++ b/src/main/java/org/modelingvalue/dclare/DclareTrace.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Derivation.java b/src/main/java/org/modelingvalue/dclare/Derivation.java index 34ee88b5..d58aaa65 100644 --- a/src/main/java/org/modelingvalue/dclare/Derivation.java +++ b/src/main/java/org/modelingvalue/dclare/Derivation.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java index 394977cc..006ec7ae 100644 --- a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Direction.java b/src/main/java/org/modelingvalue/dclare/Direction.java index 88229a1a..91e1ad60 100644 --- a/src/main/java/org/modelingvalue/dclare/Direction.java +++ b/src/main/java/org/modelingvalue/dclare/Direction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Feature.java b/src/main/java/org/modelingvalue/dclare/Feature.java index 497b5e7e..a4bb3ebf 100644 --- a/src/main/java/org/modelingvalue/dclare/Feature.java +++ b/src/main/java/org/modelingvalue/dclare/Feature.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java index 31df231c..d0c8a2f3 100644 --- a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java +++ b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java index 63689b9f..81e707d0 100644 --- a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java +++ b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Getable.java b/src/main/java/org/modelingvalue/dclare/Getable.java index 7b46c6c0..07a5055d 100644 --- a/src/main/java/org/modelingvalue/dclare/Getable.java +++ b/src/main/java/org/modelingvalue/dclare/Getable.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/IState.java b/src/main/java/org/modelingvalue/dclare/IState.java index 153a8617..61e85971 100644 --- a/src/main/java/org/modelingvalue/dclare/IState.java +++ b/src/main/java/org/modelingvalue/dclare/IState.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java index b099e5cc..301b6755 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index da89bfa0..3c6c1710 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Imperative.java b/src/main/java/org/modelingvalue/dclare/Imperative.java index 0092578a..6c41732e 100644 --- a/src/main/java/org/modelingvalue/dclare/Imperative.java +++ b/src/main/java/org/modelingvalue/dclare/Imperative.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 68974869..49528869 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/JsonToState.java b/src/main/java/org/modelingvalue/dclare/JsonToState.java index 6dbeb6e6..d5c7c456 100644 --- a/src/main/java/org/modelingvalue/dclare/JsonToState.java +++ b/src/main/java/org/modelingvalue/dclare/JsonToState.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java index 787a1373..374d621a 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java index 0e092b3e..430c9001 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Leaf.java b/src/main/java/org/modelingvalue/dclare/Leaf.java index 7a46032e..6824c1a8 100644 --- a/src/main/java/org/modelingvalue/dclare/Leaf.java +++ b/src/main/java/org/modelingvalue/dclare/Leaf.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/LeafModifier.java b/src/main/java/org/modelingvalue/dclare/LeafModifier.java index 864ecc8e..9b6f1e6e 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/LeafModifier.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index d807be84..9cb29a3a 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index 04428886..1707e3e3 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 61c32624..1f648932 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/MutableClass.java b/src/main/java/org/modelingvalue/dclare/MutableClass.java index 8cbf535f..5ab550e0 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableClass.java +++ b/src/main/java/org/modelingvalue/dclare/MutableClass.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/MutableState.java b/src/main/java/org/modelingvalue/dclare/MutableState.java index c4a7cb46..7a278a66 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableState.java +++ b/src/main/java/org/modelingvalue/dclare/MutableState.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index b7e45d1f..f3e9fedd 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Newable.java b/src/main/java/org/modelingvalue/dclare/Newable.java index c255c678..03efced2 100644 --- a/src/main/java/org/modelingvalue/dclare/Newable.java +++ b/src/main/java/org/modelingvalue/dclare/Newable.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java index 5b5ac2f4..2cf9a0d8 100644 --- a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java index 75950c82..820d8fcc 100644 --- a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Observed.java b/src/main/java/org/modelingvalue/dclare/Observed.java index 0c5875ed..2b60e3df 100644 --- a/src/main/java/org/modelingvalue/dclare/Observed.java +++ b/src/main/java/org/modelingvalue/dclare/Observed.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java index 3431686f..a9785839 100644 --- a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index 1d720412..1ea5fea6 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 159d90e3..6c2eb57c 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index a3ea1e8a..922ae951 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 543d93c5..33886679 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Priority.java b/src/main/java/org/modelingvalue/dclare/Priority.java index db664b78..494c6f2b 100644 --- a/src/main/java/org/modelingvalue/dclare/Priority.java +++ b/src/main/java/org/modelingvalue/dclare/Priority.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnly.java b/src/main/java/org/modelingvalue/dclare/ReadOnly.java index 66438262..3f0a17b2 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnly.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnly.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index 17c8c845..d3edbd47 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java index 838ed27a..83835dbf 100644 --- a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index c63711f3..44a3712f 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/SetableModifier.java b/src/main/java/org/modelingvalue/dclare/SetableModifier.java index 98d249af..7a37b47e 100644 --- a/src/main/java/org/modelingvalue/dclare/SetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/SetableModifier.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index 13a37c9f..d0b67a3a 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java index 8579449c..aa1a7982 100644 --- a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/StateMap.java b/src/main/java/org/modelingvalue/dclare/StateMap.java index 7626b1dc..c3a10042 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMap.java +++ b/src/main/java/org/modelingvalue/dclare/StateMap.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java index 4bbbc22e..dbdae609 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index 4a470017..294a9096 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/This.java b/src/main/java/org/modelingvalue/dclare/This.java index 098c4044..c7ba7141 100644 --- a/src/main/java/org/modelingvalue/dclare/This.java +++ b/src/main/java/org/modelingvalue/dclare/This.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Transaction.java b/src/main/java/org/modelingvalue/dclare/Transaction.java index aab74a2b..c6fad5dc 100644 --- a/src/main/java/org/modelingvalue/dclare/Transaction.java +++ b/src/main/java/org/modelingvalue/dclare/Transaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/TransactionClass.java b/src/main/java/org/modelingvalue/dclare/TransactionClass.java index d95ce488..ebe6453a 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionClass.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionClass.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/TransactionId.java b/src/main/java/org/modelingvalue/dclare/TransactionId.java index 664d6a81..7f70acf5 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionId.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionId.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java index 92913971..2a344061 100644 --- a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java +++ b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index eb632e5d..01b89e30 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java index a280c655..7f10f98e 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 0e25a158..fcc76998 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare; diff --git a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java index 13059ef8..06db1e62 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java index fe22b2d9..8946f850 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java index 59ca0b28..24c94828 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java index c314b51f..c2da64c4 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java index b2cbe19f..7f91eab1 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java index 44e86a10..00c234b5 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java index 5546929a..81e83df3 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java index f9ed913f..d999e1e7 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java index ba872ce0..a7f86b8a 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java index 72b5fbb7..8f3a8891 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java index 107e6cd9..300f3684 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java index df231e41..9312f5d0 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.ex; diff --git a/src/main/java/org/modelingvalue/dclare/sync/Converters.java b/src/main/java/org/modelingvalue/dclare/sync/Converters.java index 0e0fb0bf..40126939 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Converters.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Converters.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java index 3c6f079a..5c023de8 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java +++ b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java index 1d91a832..850c846c 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java +++ b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java index 298e7d5e..3bc58659 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java index 4359df54..4824d3e2 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java index 6b857dd9..51d88799 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java index 0f6b5ad0..cbc55e8a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java index a40aa692..5bb854c9 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java index 3d323823..e6708865 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java index 8995977c..775b7b55 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/Util.java b/src/main/java/org/modelingvalue/dclare/sync/Util.java index bc053b7a..86d8c59a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Util.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Util.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java index 81e02c36..e19ce203 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java +++ b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.sync; diff --git a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java index 8042a15d..6615d359 100644 --- a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test; diff --git a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java index a8251f78..c66b7209 100644 --- a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test; diff --git a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java index 94151483..ff314448 100644 --- a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test; diff --git a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java index 4b0650a8..a8fe7561 100644 --- a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test; diff --git a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java index 89c3728e..e0fee763 100644 --- a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java index 1164d187..9407541b 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java index b54f7fe6..a2bd6aff 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java index cfcb22da..8c6812a8 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index 1fa3b7a9..ce613f90 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java index 7fe62d3a..200cc17a 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java index 6196f360..f828e143 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java index 13f15148..d2361a59 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java index ead81301..af432bf7 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java index d0b1af6e..36d6340a 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java index dc34f553..b9f25ed5 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java index 71f65057..77a3e886 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java index 33d54936..a655b961 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java index 33ecf2f1..eb9dcce1 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java index 1ebfe3e0..e6a7f026 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java index da862794..8b7fa03c 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java @@ -1,17 +1,22 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus, Ronald Krijgsheld ~ -// Contributors: ~ -// Arjan Kok, Carel Bast ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ package org.modelingvalue.dclare.test.support; From c49808b8918ef9253ab3b8d9cc377645c43b441e Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 9 Feb 2024 14:29:39 +0100 Subject: [PATCH 023/179] extra check on deriveValue --- .../org/modelingvalue/dclare/AbstractDerivationTransaction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index aece1320..433712f6 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -184,7 +184,7 @@ public T set(O object, Setable setable, T post) { if (doDeriveSet(object, setable)) { Observed observed = (Observed) setable; DerivedValue derivedValue = DERIVED_VALUE.get(); - boolean isDerived = derivedValue.isDerived(object, observed); + boolean isDerived = derivedValue != null && derivedValue.isDerived(object, observed); ConstantState mem = memoization(object); Constant constant = observed.constant(); T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(this, object, constant) ? mem.get(this, object, constant) : getNonDerived(object, setable); From da895b1d37a8d0fd352896700bfd5b6f3d8b5967 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 20 Feb 2024 17:10:40 +0100 Subject: [PATCH 024/179] matching observeds --- .../dclare/CoreSetableModifier.java | 3 +- .../org/modelingvalue/dclare/MatchInfo.java | 4 +- .../org/modelingvalue/dclare/Observed.java | 6 +++ .../dclare/ObserverTransaction.java | 2 +- .../dclare/test/NewableTests.java | 41 +++++++------------ 5 files changed, 26 insertions(+), 30 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java index a9803059..a7550995 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java @@ -30,5 +30,6 @@ public enum CoreSetableModifier implements SetableModifier> { doNotMerge, orphansAllowed, preserved, - doNotClear; + doNotClear, + match; } diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index 1707e3e3..905c1e59 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -35,6 +35,7 @@ public class MatchInfo { private final Object identity; private final boolean containment; private final boolean many; + private final boolean match; private QualifiedSet allDerivations; @@ -47,6 +48,7 @@ public static MatchInfo of(Newable newable, ObserverTransaction otx, Mutable obj private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Observed observed, boolean many) { this.newable = newable; this.containment = observed.containment(); + this.match = observed.match(); this.many = many; ConstantState constants = otx.universeTransaction().tmpConstants(); removed = otx.startState(Priority.three).get(newable, Mutable.D_PARENT_CONTAINING) == null && // @@ -67,7 +69,7 @@ private MatchInfo(Newable newable, ObserverTransaction otx, Mutable object, Obse } public boolean mustReplace(MatchInfo replaced) { - if (!many || containment) { + if (!many || containment || match) { return canBeReplacing() && replaced.canBeReplaced() && Objects.equals(identity(), replaced.identity()) && // !replaced.allDerivations.anyMatch(c -> (isDerived() && initialConstruction.reason().equals(c.reason())) || c.hasSource(newable)); } else { diff --git a/src/main/java/org/modelingvalue/dclare/Observed.java b/src/main/java/org/modelingvalue/dclare/Observed.java index 2b60e3df..c554bb2c 100644 --- a/src/main/java/org/modelingvalue/dclare/Observed.java +++ b/src/main/java/org/modelingvalue/dclare/Observed.java @@ -80,6 +80,7 @@ public static Observed of(Object id, Function def, Supplier> readers = Setable.of(Pair.of(this, "readers"), Set.of()); private final Setable> writers = Setable.of(Pair.of(this, "writers"), Set.of()); private final boolean mandatory; + private final boolean match; private final Observers observers; @SuppressWarnings("rawtypes") private final Entry> thisInstance = Entry.of(this, Mutable.THIS_SINGLETON); @@ -88,6 +89,7 @@ public static Observed of(Object id, Function def, Supplier def, Supplier> opposite, Supplier>> scope, QuadConsumer changed, SetableModifier... modifiers) { super(id, def, opposite, scope, changed, modifiers); this.mandatory = hasModifier(CoreSetableModifier.mandatory); + this.match = hasModifier(CoreSetableModifier.match); this.observers = new Observers<>(this); } @@ -112,6 +114,10 @@ public boolean mandatory() { return mandatory; } + public boolean match() { + return match; + } + public Setable> readers() { return readers; } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 922ae951..9d43143f 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -223,7 +223,7 @@ protected void trace(State pre, DefaultMap> observeds) { private ObserverTrace trace(State pre, DefaultMap> observeds, Setable> setable) { List traces = setable.get(mutable()); Pair> p = Mutable.D_PARENT_CONTAINING.get(mutable()); - if (p.b() instanceof Observed) { + if (p != null && p.b() instanceof Observed) { observeds = observeds.put((Observed) p.b(), observeds.get((Observed) p.b()).add(p.a())); } ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), nrOfChanges, // diff --git a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java index a8fe7561..5886bbe5 100644 --- a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java @@ -20,6 +20,17 @@ package org.modelingvalue.dclare.test; +import static org.junit.jupiter.api.Assertions.*; +import static org.modelingvalue.dclare.CoreSetableModifier.*; +import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; +import static org.modelingvalue.dclare.test.support.TestNewable.create; +import static org.modelingvalue.dclare.test.support.TestNewable.n; + +import java.util.Objects; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; + import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.RepetitionInfo; import org.junit.jupiter.api.Test; @@ -33,15 +44,7 @@ import org.modelingvalue.collections.util.Concurrent; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.collections.util.StatusProvider.StatusIterator; -import org.modelingvalue.dclare.DclareConfig; -import org.modelingvalue.dclare.Direction; -import org.modelingvalue.dclare.LeafTransaction; -import org.modelingvalue.dclare.Newable; -import org.modelingvalue.dclare.Observed; -import org.modelingvalue.dclare.Setable; -import org.modelingvalue.dclare.State; -import org.modelingvalue.dclare.Universe; -import org.modelingvalue.dclare.UniverseTransaction; +import org.modelingvalue.dclare.*; import org.modelingvalue.dclare.UniverseTransaction.Status; import org.modelingvalue.dclare.test.support.TestMutable; import org.modelingvalue.dclare.test.support.TestMutableClass; @@ -49,22 +52,6 @@ import org.modelingvalue.dclare.test.support.TestNewableClass; import org.modelingvalue.dclare.test.support.TestUniverse; -import java.util.Objects; -import java.util.Optional; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.modelingvalue.dclare.CoreSetableModifier.containment; -import static org.modelingvalue.dclare.CoreSetableModifier.mandatory; -import static org.modelingvalue.dclare.CoreSetableModifier.symmetricOpposite; -import static org.modelingvalue.dclare.CoreSetableModifier.synthetic; -import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; -import static org.modelingvalue.dclare.test.support.TestNewable.create; -import static org.modelingvalue.dclare.test.support.TestNewable.n; - @SuppressWarnings("OptionalGetWithoutIsPresent") public class NewableTests { @@ -144,10 +131,10 @@ public State bidirectional(DclareConfig config) { U.observe(cs, u -> { List bs = cs.get(u).filter(B::isInstance).asList(); - return Collection.concat(bs.map(ar::get), bs).asList(); + return Collection.concat(bs.map(ar::get), bs).requireNonNull().asList(); }, b2a).observe(cs, u -> { List as = cs.get(u).filter(A::isInstance).asList(); - return Collection.concat(as, as.map(br::get)).asList(); + return Collection.concat(as, as.map(br::get)).requireNonNull().asList(); }, a2b); A.observe(br, a -> create(B, x -> x.// From 23d3bb2ff81cba1dfa9cfa3af780c21841a9d2a0 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Fri, 23 Feb 2024 10:13:53 +0100 Subject: [PATCH 025/179] add timing on Actions --- .../java/org/modelingvalue/dclare/Action.java | 8 ++++- .../org/modelingvalue/dclare/OneShot.java | 36 +++++++++++-------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index 8b3d981f..3732d3ff 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -37,6 +37,7 @@ public static Action of(Object id, Consumer action, Le private final Direction direction; private final boolean preserved; private final boolean read; + private long durationNano = -1; protected Action(Object id, Consumer action, LeafModifier... modifiers) { super(id, modifiers); @@ -44,7 +45,7 @@ protected Action(Object id, Consumer action, LeafModifier... modifiers) { Direction dir = getModifier(Direction.class); this.direction = dir == null ? Direction.DEFAULT : dir; this.preserved = hasModifier(LeafModifier.preserved); - this.read = hasModifier(LeafModifier.read); + this.read = hasModifier(LeafModifier.read); } @Override @@ -58,7 +59,9 @@ public void closeTransaction(Transaction tx) { } public void run(O object) { + long t0 = System.nanoTime(); action.accept(object); + durationNano = System.nanoTime() - t0; } public void trigger(O mutable) { @@ -95,4 +98,7 @@ public boolean read() { return read; } + public long durationNano() { + return durationNano; + } } diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 33886679..9fd070ee 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -20,14 +20,6 @@ package org.modelingvalue.dclare; -import org.modelingvalue.collections.Collection; -import org.modelingvalue.collections.List; -import org.modelingvalue.collections.Map; -import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.util.ContextThread; -import org.modelingvalue.collections.util.ContextPool; -import org.modelingvalue.collections.util.MutationWrapper; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -46,6 +38,14 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; +import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.List; +import org.modelingvalue.collections.Map; +import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.util.ContextPool; +import org.modelingvalue.collections.util.ContextThread; +import org.modelingvalue.collections.util.MutationWrapper; + /** * This class will enable you to build a model in a dclare universe and then finish. * All methods marked with {@link OneShotAction} will be executed in alphabetical order. @@ -75,7 +75,6 @@ public abstract class OneShot { boolean caching() default false; } - @SuppressWarnings("DataFlowIssue") public OneShot(U universe) { this.universe = universe; @@ -133,7 +132,6 @@ public void clearCache() { * * @return the end state */ - @SuppressWarnings("DataFlowIssue") public State getEndState() { if (endState != null) { return endState; @@ -145,13 +143,13 @@ public State getEndState() { StateMap cachedStateMap = STATE_MAP_CACHE.get().get(cacheKey); boolean runningFromCache = cachedStateMap != null; UniverseTransaction universeTransaction = new UniverseTransaction(getUniverse(), contextPool, getConfig(), null, cachedStateMap); - long t0 = System.currentTimeMillis(); + long t0 = System.nanoTime(); List allActions = getAllActions(runningFromCache); trace("START", "#actions=%d", allActions.size()); allActions.forEach(a -> a.putAndWaitForIdle(universeTransaction)); universeTransaction.stop(); endState = universeTransaction.waitForEnd(); - trace("DONE", "duration=%5d ms", System.currentTimeMillis() - t0); + trace("DONE", "duration=%5d ms", nano2ms(System.nanoTime() - t0)); } finally { doneWithContextPool(contextPool); } @@ -188,7 +186,7 @@ protected MyAction(Method method, boolean runningFromCache) { } protected void putAndWaitForIdle(UniverseTransaction universeTransaction) { - long t00 = System.currentTimeMillis(); + long t0 = System.nanoTime(); boolean writeResultToCache = isCachingMethod && !runningFromCache; boolean skip = isCachingMethod && runningFromCache; if (skip) { @@ -197,11 +195,17 @@ protected void putAndWaitForIdle(UniverseTransaction universeTransaction) { trace(" >>ACTION", "%s", id()); State intermediateState = universeTransaction.putAndWaitForIdle(this); traceDiff(intermediateState); - trace(" < a.computeIfAbsent(cacheKey, __ -> intermediateState.getStateMap())); } + long overallNano = System.nanoTime() - t0; + long methodNano = durationNano(); + long dtOverall = nano2ms(overallNano); + long dtMethod = nano2ms(methodNano); + long dtRules = nano2ms(overallNano - methodNano); + trace(" < Date: Fri, 23 Feb 2024 11:04:58 +0100 Subject: [PATCH 026/179] add timing on Actions --- src/main/java/org/modelingvalue/dclare/OneShot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 9fd070ee..e6fb9c44 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -205,7 +205,7 @@ protected void putAndWaitForIdle(UniverseTransaction universeTransaction) { long dtOverall = nano2ms(overallNano); long dtMethod = nano2ms(methodNano); long dtRules = nano2ms(overallNano - methodNano); - trace(" < Date: Tue, 27 Feb 2024 14:30:46 +0100 Subject: [PATCH 027/179] less deduplication --- src/main/java/org/modelingvalue/dclare/State.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index d0b67a3a..0d0ca072 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -200,7 +200,9 @@ public State merge(StateMergeHandler changeHandler, State[] branches, int length if (changeHandler != null) { for (Entry p : props) { if (p != ps.getEntry(p.getKey())) { - deduplicate(p); + if (p.getKey().deduplicate(p.getValue())) { + deduplicate(p); + } changeHandler.handleChange(o, p.getKey(), ps, pss, props, this); } } From 4b389f88714eee648e2766d0c73460897e222310 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 27 Feb 2024 16:10:50 +0100 Subject: [PATCH 028/179] Merge branch 'develop' of https://github.com/ModelingValueGroup/dclare.git into develop --- src/main/java/org/modelingvalue/dclare/ConstantState.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 61854bef..13349a95 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -328,7 +328,7 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, Constants constants = prev.get(object); if (constants == null) { Set allWithEqualhash = prev.allWithEqualhash(object); - if (allWithEqualhash.size() >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL - 2) { + while (allWithEqualhash.size() >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL - 4) { int i = 0; for (Constants c : allWithEqualhash) { if (!(c.ref instanceof Constants.DurableRef)) { @@ -338,6 +338,7 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, } } } + allWithEqualhash = prev.allWithEqualhash(object); } object = leafTransaction.state().canonical(object); constants = new Constants<>(object, referenceType, queue); From 2f3db7eb5091c3bf289cb4adf2b1773bd044d2c2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 27 Feb 2024 16:35:26 +0100 Subject: [PATCH 029/179] prune equal hashes --- .../modelingvalue/dclare/ConstantState.java | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 13349a95..d9440eb7 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -327,21 +327,9 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, QualifiedSet prev = state.get(); Constants constants = prev.get(object); if (constants == null) { - Set allWithEqualhash = prev.allWithEqualhash(object); - while (allWithEqualhash.size() >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL - 4) { - int i = 0; - for (Constants c : allWithEqualhash) { - if (!(c.ref instanceof Constants.DurableRef)) { - prev = removeConstants(c); - if (++i >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL / 2) { - break; - } - } - } - allWithEqualhash = prev.allWithEqualhash(object); - } object = leafTransaction.state().canonical(object); constants = new Constants<>(object, referenceType, queue); + prev = pruneEqualHashes(object, prev); QualifiedSet next = prev.add(constants); Constants now; while (!state.compareAndSet(prev, next)) { @@ -354,6 +342,7 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, } return now; } + prev = pruneEqualHashes(object, prev); next = prev.add(constants); } } else if (referenceType.strongness > constants.referenceType().strongness) { @@ -362,6 +351,23 @@ private Constants getConstants(LeafTransaction leafTransaction, O object, return constants; } + private QualifiedSet pruneEqualHashes(O object, QualifiedSet prev) { + Set allWithEqualhash = prev.allWithEqualhash(object); + while (allWithEqualhash.size() >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL - 4) { + int i = 0; + for (Constants c : allWithEqualhash) { + if (!(c.ref instanceof Constants.DurableRef)) { + prev = removeConstants(c); + if (++i >= HashCollectionImpl.EQUAL_HASHCODE_WARNING_LEVEL / 2) { + break; + } + } + } + allWithEqualhash = prev.allWithEqualhash(object); + } + return prev; + } + private QualifiedSet removeConstants(Constants constants) { QualifiedSet prev = state.get(); Object object = constants.object(); From e0a18284105964f0e0f6dcd92506a2cce0d2ca93 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 28 Feb 2024 11:30:57 +0100 Subject: [PATCH 030/179] NO_DEDUPLICATION flag --- .../org/modelingvalue/dclare/Mutable.java | 7 ++-- .../org/modelingvalue/dclare/Observed.java | 16 ++++++---- .../org/modelingvalue/dclare/Observer.java | 32 ++++++++++--------- .../org/modelingvalue/dclare/Setable.java | 3 +- 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 1f648932..4bb13c5a 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -20,10 +20,7 @@ package org.modelingvalue.dclare; -import static org.modelingvalue.dclare.CoreSetableModifier.doNotMerge; -import static org.modelingvalue.dclare.CoreSetableModifier.durable; -import static org.modelingvalue.dclare.CoreSetableModifier.plumbing; -import static org.modelingvalue.dclare.CoreSetableModifier.preserved; +import static org.modelingvalue.dclare.CoreSetableModifier.*; import java.util.function.Predicate; @@ -43,6 +40,8 @@ public interface Mutable extends TransactionClass { Set THIS_SINGLETON = Set.of(THIS); + Constant> SINGLETON = Constant.of("$SINGLETON", Set::of); + @SuppressWarnings("rawtypes") ParentContaining D_PARENT_CONTAINING = new ParentContaining("D_PARENT_CONTAINING", plumbing, preserved); diff --git a/src/main/java/org/modelingvalue/dclare/Observed.java b/src/main/java/org/modelingvalue/dclare/Observed.java index c554bb2c..e6c11ea4 100644 --- a/src/main/java/org/modelingvalue/dclare/Observed.java +++ b/src/main/java/org/modelingvalue/dclare/Observed.java @@ -77,13 +77,15 @@ public static Observed of(Object id, Function def, Supplier(id, def, opposite, scope, null, modifiers); } - private final Setable> readers = Setable.of(Pair.of(this, "readers"), Set.of()); - private final Setable> writers = Setable.of(Pair.of(this, "writers"), Set.of()); - private final boolean mandatory; - private final boolean match; - private final Observers observers; + private final Setable> readers = Setable.of(Pair.of(this, "readers"), Set.of()); + private final Setable> writers = Setable.of(Pair.of(this, "writers"), Set.of()); + private final boolean mandatory; + private final boolean match; + private final Observers observers; @SuppressWarnings("rawtypes") - private final Entry> thisInstance = Entry.of(this, Mutable.THIS_SINGLETON); + private final Entry> thisInstance = Entry.of(this, Mutable.THIS_SINGLETON); + @SuppressWarnings("rawtypes") + private final Constant>> entry = Constant.of(Pair.of(this, "entry"), m -> Entry.of(this, Mutable.SINGLETON.get(m))); @SuppressWarnings({"unchecked", "rawtypes"}) protected Observed(Object id, Function def, Supplier> opposite, Supplier>> scope, QuadConsumer changed, SetableModifier... modifiers) { @@ -154,7 +156,7 @@ public String toString() { @SuppressWarnings("rawtypes") protected Entry> entry(Mutable object, Mutable self) { - return object.equals(self) ? thisInstance : Entry.of(this, Set.of(object)); + return object.equals(self) ? thisInstance : entry.get(object); } @Override diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index 1ea5fea6..a745fe95 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -70,24 +70,26 @@ public static Observer of(Object id, Setable set return new Observer(id, setable, predicate, value, modifiers); } - private final Traces traces; - private final Debugs debugs; - private final ExceptionSetable exception; - private final Observerds observeds; - private final Constructed constructed; + private final Traces traces; + private final Debugs debugs; + private final ExceptionSetable exception; + private final Observerds observeds; + private final Constructed constructed; @SuppressWarnings("rawtypes") - private final Set> targets; - private final boolean anonymous; - private final boolean atomic; + private final Set> targets; + private final boolean anonymous; + private final boolean atomic; - private long runCount = -1; - private int instances; - private int changes; - private boolean stopped; - private boolean trace; + private long runCount = -1; + private int instances; + private int changes; + private boolean stopped; + private boolean trace; @SuppressWarnings("rawtypes") - private final Entry> thisInstance = Entry.of(this, Mutable.THIS_SINGLETON); + private final Entry> thisInstance = Entry.of(this, Mutable.THIS_SINGLETON); + @SuppressWarnings("rawtypes") + private final Constant>> entry = Constant.of(Pair.of(this, "entry"), m -> Entry.of(this, Mutable.SINGLETON.get(m))); protected Observer(Object id, Consumer action, LeafModifier... modifiers) { this(id, action, Set.of(), modifiers); @@ -383,7 +385,7 @@ public String toString() { @SuppressWarnings("rawtypes") private Entry entry(Mutable object, Mutable self) { - return object.equals(self) ? thisInstance : Entry.of(this, Set.of(object)); + return object.equals(self) ? thisInstance : entry.get(object); } @SuppressWarnings("rawtypes") diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index 44a3712f..9b947f95 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -44,6 +44,7 @@ public class Setable extends Getable { private static final boolean DANGER_ALWAYS_ALLOW_ORPHANS = Boolean.getBoolean("DANGER_ALWAYS_ALLOW_ORPHANS"); + private static final boolean NO_DEDUPLICATION = Boolean.getBoolean("NO_DEDUPLICATION"); private static final Context MOVING = Context.of(false); @@ -154,7 +155,7 @@ protected Entry entry(T value, DefaultMap prop } protected boolean deduplicate(T value) { - return value instanceof ContainingCollection; + return !NO_DEDUPLICATION && value instanceof ContainingCollection; } public Direction direction() { From 6f7fef283bd83b5f6fe6f8141d3bc69db00ef9de Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 4 Mar 2024 14:12:49 +0100 Subject: [PATCH 031/179] push / pull support --- .../dclare/AbstractDerivationTransaction.java | 70 +++++----- .../dclare/ActionTransaction.java | 49 +++++-- .../dclare/ConstantChangeHandler.java | 11 ++ .../modelingvalue/dclare/ConstantState.java | 50 ++++---- .../dclare/IdentityDerivationTransaction.java | 6 +- .../dclare/LazyDerivationTransaction.java | 10 +- .../modelingvalue/dclare/LeafTransaction.java | 9 +- .../org/modelingvalue/dclare/Mutable.java | 13 ++ .../dclare/MutableTransaction.java | 75 +++++------ .../dclare/ObserverTransaction.java | 4 +- .../org/modelingvalue/dclare/OneShot.java | 120 ++++++++---------- .../dclare/ReadOnlyTransaction.java | 2 +- .../org/modelingvalue/dclare/Setable.java | 21 ++- .../java/org/modelingvalue/dclare/State.java | 13 +- .../org/modelingvalue/dclare/Transaction.java | 8 ++ .../org/modelingvalue/dclare/Universe.java | 14 +- .../dclare/UniverseTransaction.java | 36 ++++-- .../dclare/ex/NotYetDerivableException.java | 5 + .../dclare/test/support/OneShotTests.java | 58 ++++----- 19 files changed, 333 insertions(+), 241 deletions(-) create mode 100644 src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java create mode 100644 src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 433712f6..7617bb10 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -40,7 +40,6 @@ public abstract class AbstractDerivationTransaction extends ReadOnlyTransaction protected static final Context> DERIVER = Context.of(null); @SuppressWarnings("rawtypes") private static final Context DERIVED_VALUE = Context.of(null); - private static final Context DERIVE = Context.of(true); private static final Context INDENT = Context.of(0); public static boolean isDeriving() { @@ -51,10 +50,12 @@ protected AbstractDerivationTransaction(UniverseTransaction universeTransaction) super(universeTransaction); } - private ConstantState memoization; + private ConstantState memoization; + private ConstantChangeHandler changeHandler; - public R derive(Supplier action, State state, ConstantState memoization) { + public R derive(Supplier action, State state, ConstantState memoization, ConstantChangeHandler changeHandler) { this.memoization = memoization; + this.changeHandler = changeHandler; try { return get(action, state); } catch (Throwable t) { @@ -62,17 +63,13 @@ public R derive(Supplier action, State state, ConstantState memoization) return null; } finally { this.memoization = null; + this.changeHandler = null; } } @SuppressWarnings("rawtypes") - protected boolean doDeriveGet(O object, Getable getable, T nonDerived) { - return doDeriveSet(object, getable); - } - - @SuppressWarnings("rawtypes") - protected boolean doDeriveSet(O object, Getable getable) { - return object instanceof Mutable && getable instanceof Observed && DERIVE.get(); + protected boolean doDerive(O object, Getable getable, T nonDerived) { + return object instanceof Mutable && getable instanceof Observed; } protected T getNonDerived(O object, Getable getable) { @@ -93,7 +90,7 @@ protected T current(O object, Getable getable) { @SuppressWarnings({"rawtypes", "unchecked"}) private T derive(O object, Getable getable, T nonDerived) { - if (doDeriveGet(object, getable, nonDerived)) { + if (doDerive(object, getable, nonDerived)) { Observed observed = (Observed) getable; DerivedValue outerDerivedValue = DERIVED_VALUE.get(); boolean isDerived = outerDerivedValue != null && outerDerivedValue.isDerived(object, observed); @@ -101,7 +98,7 @@ private T derive(O object, Getable getable, T nonDerived) { Constant constant = observed.constant(); if (isDerived && outerDerivedValue.isSet()) { return outerDerivedValue.get(); - } else if (!mem.isSet(this, object, constant)) { + } else if (!mem.isSet(changeHandler, object, constant)) { if (Newable.D_ALL_DERIVATIONS.equals(observed) || Mutable.D_PARENT_CONTAINING.equals(observed)) { return nonDerived; } else { @@ -128,10 +125,10 @@ private T derive(O object, Getable getable, T nonDerived) { runDeriver((Mutable) object, observed, observer, ++i); } if (innerDerivedValue.isSet()) { - setInMemoization(mem, object, observed, innerDerivedValue.get()); + setInMemoization(mem, object, observed, innerDerivedValue.get(), false); } }))); - if (!mem.isSet(this, object, constant)) { + if (!mem.isSet(changeHandler, object, constant)) { if (isTraceDerivation(object, observed)) { INDENT.run(INDENT.get() + 1, () -> runNonDeriving(() -> System.err.println(tracePre(object) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); } @@ -140,7 +137,7 @@ private T derive(O object, Getable getable, T nonDerived) { } } } - return mem.get(this, object, constant); + return mem.get(changeHandler, object, constant); } else { return nonDerived; } @@ -166,33 +163,40 @@ protected void runDeriver(Mutable mutable, Observed observed, Observer observer, @Override public T set(O object, Setable setable, BiFunction function, E element) { - return set(object, setable, function.apply(getNonDerived(object, setable), element)); + T nonDerived = getNonDerived(object, setable); + return set(object, setable, function.apply(nonDerived, element), nonDerived); } @Override public T set(O object, Setable setable, UnaryOperator oper) { - return set(object, setable, oper.apply(getNonDerived(object, setable))); + T nonDerived = getNonDerived(object, setable); + return set(object, setable, oper.apply(nonDerived), nonDerived); + } + + @Override + public T set(O object, Setable setable, T post) { + T nonDerived = getNonDerived(object, setable); + return set(object, setable, post, nonDerived); } public void runNonDeriving(Runnable action) { - DERIVE.run(false, action); + DERIVED.run(Set.of(), action); } @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public T set(O object, Setable setable, T post) { - if (doDeriveSet(object, setable)) { + private T set(O object, Setable setable, T post, T nonDerived) { + if (doDerive(object, setable, nonDerived) && isDeriving()) { Observed observed = (Observed) setable; DerivedValue derivedValue = DERIVED_VALUE.get(); boolean isDerived = derivedValue != null && derivedValue.isDerived(object, observed); ConstantState mem = memoization(object); Constant constant = observed.constant(); - T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(this, object, constant) ? mem.get(this, object, constant) : getNonDerived(object, setable); + T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(changeHandler, object, constant) ? mem.get(changeHandler, object, constant) : nonDerived; T result = match(mem, observed, pre, post); if (isDerived) { derivedValue.set(result); } else { - setInMemoization(mem, object, observed, result); + setInMemoization(mem, object, observed, result, false); } if (isTraceDerivation(object, observed)) { runNonDeriving(() -> { @@ -202,13 +206,13 @@ public T set(O object, Setable setable, T post) { } if (observed.containment()) { Setable. diff(pre, result, added -> { - setInMemoization(mem, added, Mutable.D_PARENT_CONTAINING, Pair.of((Mutable) object, (Setable) observed)); + setInMemoization(mem, added, Mutable.D_PARENT_CONTAINING, Pair.of((Mutable) object, (Setable) observed), true); }, removed -> { }); } return pre; - } else if (!Objects.equals(getNonDerived(object, setable), post)) { - return super.set(object, setable, post); + } else if (!Objects.equals(nonDerived, post)) { + return changeHandler.set(object, setable, post); } else { return post; } @@ -221,21 +225,21 @@ private T match(ConstantState mem, Setable setable, T pre, T post) if (!pres.isEmpty()) { for (Newable po : posts) { Construction poInit = Mutable.D_INITIAL_CONSTRUCTION.get(po); - if (poInit.isDerived() && mem.isSet(this, po, Newable.D_ALL_DERIVATIONS.constant())) { + if (poInit.isDerived() && mem.isSet(changeHandler, po, Newable.D_ALL_DERIVATIONS.constant())) { for (Newable pr : pres) { Construction preInit = Mutable.D_INITIAL_CONSTRUCTION.get(pr); if (preInit.isDirect() && po.dNewableType().equals(pr.dNewableType()) && Objects.equals(po.dIdentity(), pr.dIdentity())) { pres = pres.remove(pr); post = replace(post, po, pr); - setInMemoization(mem, pr, Mutable.D_ALL_DERIVATIONS, mem.get(this, po, Newable.D_ALL_DERIVATIONS.constant())); + setInMemoization(mem, pr, Mutable.D_ALL_DERIVATIONS, mem.get(changeHandler, po, Newable.D_ALL_DERIVATIONS.constant()), true); } } } else if (poInit.isDirect()) { for (Newable pr : pres) { Construction preInit = Mutable.D_INITIAL_CONSTRUCTION.get(pr); - if (preInit.isDerived() && mem.isSet(this, pr, Newable.D_ALL_DERIVATIONS.constant()) && po.dNewableType().equals(pr.dNewableType()) && Objects.equals(po.dIdentity(), pr.dIdentity())) { + if (preInit.isDerived() && mem.isSet(changeHandler, pr, Newable.D_ALL_DERIVATIONS.constant()) && po.dNewableType().equals(pr.dNewableType()) && Objects.equals(po.dIdentity(), pr.dIdentity())) { pres = pres.remove(pr); - setInMemoization(mem, po, Mutable.D_ALL_DERIVATIONS, mem.get(this, pr, Newable.D_ALL_DERIVATIONS.constant())); + setInMemoization(mem, po, Mutable.D_ALL_DERIVATIONS, mem.get(changeHandler, pr, Newable.D_ALL_DERIVATIONS.constant()), true); } } } @@ -266,13 +270,13 @@ public O construct(Reason reason, Supplier supplier) { Pair deriver = DERIVER.get(); O result = supplier.get(); Construction cons = Construction.of(deriver.a(), deriver.b(), reason); - setInMemoization(memoization(deriver.a()), result, Newable.D_ALL_DERIVATIONS, Newable.D_ALL_DERIVATIONS.getDefault(result).add(cons)); + setInMemoization(memoization(deriver.a()), result, Newable.D_ALL_DERIVATIONS, Newable.D_ALL_DERIVATIONS.getDefault(result).add(cons), true); Mutable.D_INITIAL_CONSTRUCTION.force(result, cons); return result; } - protected void setInMemoization(ConstantState mem, O object, Setable setable, T result) { - mem.set(this, object, setable.constant(), result, true); + protected void setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { + mem.set(changeHandler, object, setable.constant(), result, force); } protected ConstantState memoization(O object) { diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 00df861a..4ccf5ac5 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -23,6 +23,7 @@ import java.util.ConcurrentModificationException; import java.util.Objects; import java.util.function.BiFunction; +import java.util.function.Supplier; import java.util.function.UnaryOperator; import org.modelingvalue.collections.DefaultMap; @@ -38,9 +39,31 @@ import org.modelingvalue.dclare.ex.TransactionException; public class ActionTransaction extends LeafTransaction implements StateMergeHandler { - private final CurrentState currentState = new CurrentState(); - private State preState; - private State postState; + private final CurrentState currentState = new CurrentState(); + private final ConstantChangeHandler changeHandler = new ConstantChangeHandler() { + @Override + public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + ActionTransaction.this.set(object, setable, preValue, postValue); + } + + @Override + public State state() { + return ActionTransaction.this.state(); + } + + @Override + public T set(O object, Setable property, T post) { + return ActionTransaction.this.set(object, property, post); + } + }; + @SuppressWarnings("unchecked") + private final Supplier supplier = () -> { + ((Action) action()).run(mutable()); + return null; + }; + + private State preState; + private State postState; protected ActionTransaction(UniverseTransaction universeTransaction) { super(universeTransaction); @@ -52,7 +75,11 @@ public final Action action() { @SuppressWarnings("unchecked") protected void run(State pre, UniverseTransaction universeTransaction) { - ((Action) action()).run(mutable()); + if (push()) { + ((Action) action()).run(mutable()); + } else { + state().derive(supplier, constantState(), changeHandler); + } } @SuppressWarnings("rawtypes") @@ -162,13 +189,15 @@ protected void setState(State state) { @SuppressWarnings({"rawtypes", "unchecked", "RedundantSuppression"}) @Override - protected void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { super.changed(object, setable, preValue, rawPreValue, postValue); - if (setable.preserved()) { - setChanged(object, setable, postValue); - } - if (setable instanceof Observed && !Objects.equals(preValue, postValue)) { - trigger(object, (Observed) setable); + if (push()) { + if (setable.preserved()) { + setChanged(object, setable, postValue); + } + if (setable instanceof Observed && !Objects.equals(preValue, postValue)) { + trigger(object, (Observed) setable); + } } } diff --git a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java b/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java new file mode 100644 index 00000000..87a1e5db --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java @@ -0,0 +1,11 @@ +package org.modelingvalue.dclare; + +public interface ConstantChangeHandler { + + void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue); + + T set(O object, Setable property, T post); + + State state(); + +} diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index d9440eb7..355f1cc1 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -156,12 +156,12 @@ public O object() { } @SuppressWarnings("unchecked") - public V get(LeafTransaction leafTransaction, O object, Constant constant, Function deriver) { + public V get(ConstantChangeHandler cch, O object, Constant constant, Function deriver) { Map, Object> prev = constants; V ist = (V) prev.get(constant); if (ist == null) { - V soll = deriver == null ? constant.getDefault(object) : derive(leafTransaction, object, constant, deriver); - ist = set(leafTransaction, object, constant, prev, soll == null ? (V) NULL : soll, false); + V soll = deriver == null ? constant.getDefault(object) : derive(cch, object, constant, deriver); + ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, false); } return ist == NULL ? null : ist; } @@ -171,11 +171,11 @@ public boolean isSet(Constant constant) { } @SuppressWarnings("unchecked") - public V set(LeafTransaction leafTransaction, O object, Constant constant, V soll, boolean forced) { + public V set(ConstantChangeHandler cch, O object, Constant constant, V soll, boolean forced) { Map, Object> prev = constants; V ist = (V) prev.get(constant); if (ist == null || forced) { - ist = set(leafTransaction, object, constant, prev, soll == null ? (V) NULL : soll, forced); + ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, forced); } if (!Objects.equals(ist == NULL ? null : ist, soll)) { throw new NonDeterministicException(object, constant, "Constant is not consistent " + StringUtil.toString(object) + "." + constant + "=" + StringUtil.toString(ist) + "!=" + StringUtil.toString(soll)); @@ -184,12 +184,12 @@ public V set(LeafTransaction leafTransaction, O object, Constant const } @SuppressWarnings("unchecked") - public V set(LeafTransaction leafTransaction, O object, Constant constant, BiFunction function, E element) { + public V set(ConstantChangeHandler cch, O object, Constant constant, BiFunction function, E element) { Map, Object> prev = constants; V ist = (V) prev.get(constant); V soll = function.apply(ist, element); if (ist == null) { - ist = set(leafTransaction, object, constant, prev, soll == null ? (V) NULL : soll, false); + ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, false); } if (!Objects.equals(ist == NULL ? null : ist, soll)) { throw new NonDeterministicException(object, constant, "Constant is not consistent " + StringUtil.toString(object) + "." + constant + "=" + StringUtil.toString(ist) + "!=" + StringUtil.toString(soll)); @@ -214,7 +214,7 @@ public String toString() { } @SuppressWarnings("unchecked") - private V set(LeafTransaction tx, O object, Constant constant, Map, Object> prev, V soll, boolean forced) { + private V set(ConstantChangeHandler cch, O object, Constant constant, Map, Object> prev, V soll, boolean forced) { V ist; Map, Object> next = prev.put(constant, soll); while (!UPDATOR.compareAndSet(this, prev, next)) { @@ -227,13 +227,13 @@ private V set(LeafTransaction tx, O object, Constant constant, Map V derive(LeafTransaction leafTransaction, O object, Constant constant, Function deriver) { + private V derive(ConstantChangeHandler cch, O object, Constant constant, Function deriver) { List> list = List.of(); while (true) { try { @@ -246,7 +246,7 @@ private V derive(LeafTransaction leafTransaction, O object, Constant c Pair me = Pair.of(object, constant); throw new NonDeterministicException(object, constant, "Circular constant definition: " + list.sublist(list.lastIndexOf(me), list.size()).add(me)); } - ConstantState.this.get(leafTransaction, lazy.a(), lazy.b()); + ConstantState.this.get(cch, lazy.a(), lazy.b()); } } finally { WEAK.setOnThread(weak); @@ -294,28 +294,28 @@ public void stop() { remover.interrupt(); } - public V get(LeafTransaction leafTransaction, O object, Constant constant) { - return getConstants(leafTransaction, object, referenceType(constant)).get(leafTransaction, object, constant, constant.deriver()); + public V get(ConstantChangeHandler cch, O object, Constant constant) { + return getConstants(cch, object, referenceType(constant)).get(cch, object, constant, constant.deriver()); } - public O object(LeafTransaction leafTransaction, O object) { - return getConstants(leafTransaction, object, ReferenceType.weak).object(); + public O object(ConstantChangeHandler cch, O object) { + return getConstants(cch, object, ReferenceType.weak).object(); } - public V get(LeafTransaction leafTransaction, O object, Constant constant, Function deriver) { - return getConstants(leafTransaction, object, referenceType(constant)).get(leafTransaction, object, constant, deriver); + public V get(ConstantChangeHandler cch, O object, Constant constant, Function deriver) { + return getConstants(cch, object, referenceType(constant)).get(cch, object, constant, deriver); } - public boolean isSet(LeafTransaction leafTransaction, O object, Constant constant) { - return getConstants(leafTransaction, object, referenceType(constant)).isSet(constant); + public boolean isSet(ConstantChangeHandler cch, O object, Constant constant) { + return getConstants(cch, object, referenceType(constant)).isSet(constant); } - public V set(LeafTransaction leafTransaction, O object, Constant constant, V value, boolean forced) { - return getConstants(leafTransaction, object, referenceType(constant)).set(leafTransaction, object, constant, value, forced); + public V set(ConstantChangeHandler cch, O object, Constant constant, V value, boolean forced) { + return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, value, forced); } - public V set(LeafTransaction leafTransaction, O object, Constant constant, BiFunction deriver, E element) { - return getConstants(leafTransaction, object, referenceType(constant)).set(leafTransaction, object, constant, deriver, element); + public V set(ConstantChangeHandler cch, O object, Constant constant, BiFunction deriver, E element) { + return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, deriver, element); } private ReferenceType referenceType(Constant constant) { @@ -323,11 +323,11 @@ private ReferenceType referenceType(Constant constant) { } @SuppressWarnings("unchecked") - private Constants getConstants(LeafTransaction leafTransaction, O object, ReferenceType referenceType) { + private Constants getConstants(ConstantChangeHandler cch, O object, ReferenceType referenceType) { QualifiedSet prev = state.get(); Constants constants = prev.get(object); if (constants == null) { - object = leafTransaction.state().canonical(object); + object = cch.state().canonical(object); constants = new Constants<>(object, referenceType, queue); prev = pruneEqualHashes(object, prev); QualifiedSet next = prev.add(constants); diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 3c6c1710..ad707024 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -37,7 +37,7 @@ public R derive(Supplier action, State state, int depth, Mutable contextM this.contextMutable = contextMutable; this.depth = depth; try { - return derive(action, state, constantState); + return derive(action, state, constantState, this); } finally { this.depth = 0; this.contextMutable = null; @@ -45,8 +45,8 @@ public R derive(Supplier action, State state, int depth, Mutable contextM } @Override - protected boolean doDeriveGet(O object, Getable getable, T nonDerived) { - return super.doDeriveGet(object, getable, nonDerived) && !isChanged(object, getable); + protected boolean doDerive(O object, Getable getable, T nonDerived) { + return super.doDerive(object, getable, nonDerived) && !isChanged(object, getable); } @SuppressWarnings("unchecked") diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java index 430c9001..6678bbb4 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java @@ -78,8 +78,8 @@ private RecursiveAction getAction(Mutable mutable) { } @Override - protected boolean doDeriveGet(O object, Getable getable, T nonDerived) { - return super.doDeriveSet(object, getable) && Objects.equals(nonDerived, getable.getDefault(object)) && ifReady(object, (Setable) getable, nonDerived); + protected boolean doDerive(O object, Getable getable, T nonDerived) { + return super.doDerive(object, getable, nonDerived) && Objects.equals(nonDerived, getable.getDefault(object)) && ifReady(object, (Setable) getable, nonDerived); } private boolean ifReady(O object, Setable setable, T nonDerived) { @@ -90,9 +90,9 @@ private boolean ifReady(O object, Setable setable, T nonDerived) { } @Override - protected void setInMemoization(ConstantState mem, O object, Setable setable, T result) { - super.setInMemoization(mem, object, setable, result); - if (setable.preserved() && !setable.direction().isLazy()) { + protected void setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { + super.setInMemoization(mem, object, setable, result, force); + if (!force && setable.preserved() && !setable.direction().isLazy()) { state.set(object, setable, result); } } diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index 9cb29a3a..d8238c47 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -36,7 +36,7 @@ import org.modelingvalue.collections.util.Context; @SuppressWarnings("unused") -public abstract class LeafTransaction extends Transaction { +public abstract class LeafTransaction extends Transaction implements ConstantChangeHandler { private static final Context CURRENT = Context.of(); @@ -87,8 +87,6 @@ public static Context getContext() { return CURRENT; } - public abstract State state(); - public State current() { return state(); } @@ -97,8 +95,6 @@ public State current() { public abstract T set(O object, Setable property, UnaryOperator oper); - public abstract T set(O object, Setable property, T post); - public T setDefault(O object, Setable property) { return set(object, property, property.getDefault(object)); } @@ -119,7 +115,8 @@ public T pre(O object, Getable property) { return universeTransaction().preState().get(object, property); } - protected void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + @Override + public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { setable.changed(this, object, rawPreValue, postValue); } diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 4bb13c5a..85b6f004 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -32,6 +32,7 @@ import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.dclare.Observer.Constructed; +import org.modelingvalue.dclare.ex.NotYetDerivableException; @SuppressWarnings("unused") public interface Mutable extends TransactionClass { @@ -263,4 +264,16 @@ private ParentContaining(Object id, SetableModifier... modifiers) { return super.get(object); } } + + @SuppressWarnings("unchecked") + public default boolean pull() { + return MutableClass.D_OBSERVEDS.get(dClass()).map(o -> { + try { + o.get(this); + } catch (NotYetDerivableException nyde) { + return true; + } + return false; + }).reduce(false, (a, b) -> a || b); + } } diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index f3e9fedd..6a07f87d 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -205,10 +205,12 @@ private State merge(State base, State[] branches) { triggeredMutables.init(Set.of()); try { State state = base.merge(this, branches, branches.length); - state = trigger(state, triggeredActions.result(), one); - for (int i = 0; i < triggeredMutables.length(); i++) { - Priority priority = triggeredMutables.priority(i); - state = triggerMutables(state, triggeredMutables.result(priority), priority); + if (push()) { + state = trigger(state, triggeredActions.result(), one); + for (int i = 0; i < triggeredMutables.length(); i++) { + Priority priority = triggeredMutables.priority(i); + state = triggerMutables(state, triggeredMutables.result(priority), priority); + } } return state; } finally { @@ -228,46 +230,47 @@ public void handleMergeConflict(Object object, Setable property, Object pre, Obj @SuppressWarnings({"rawtypes", "unchecked"}) @Override public void handleChange(Object object, Setable setable, DefaultMap baseValues, DefaultMap[] branchesValues, DefaultMap resultValues, State base) { - if (setable instanceof Observers) { - Observers os = (Observers) setable; - DefaultMap> baseObservers = StateMap.get(baseValues, os); - DefaultMap> resultObservers = StateMap.get(resultValues, os); - os.observed().checkTooManyObservers(universeTransaction(), object, resultObservers); - DefaultMap> addedResultObservers = resultObservers.removeAll(baseObservers, Set::removeAll); - if (!addedResultObservers.isEmpty()) { - Observed observedProp = os.observed(); - Object baseValue = StateMap.get(baseValues, observedProp); - for (DefaultMap branchValues : branchesValues) { - Object branchValue = StateMap.get(branchValues, observedProp); - if (!Objects.equals(branchValue, baseValue)) { - DefaultMap> branchObservers = StateMap.get(branchValues, os); - Map> missingBranchObservers = addedResultObservers.removeAll(branchObservers, Set::removeAll).// - asMap(e -> Entry.of(e.getKey(), e.getValue().map(m -> m.dResolve((Mutable) object)).asSet())); - triggeredActions.change(ts -> ts.addAll(missingBranchObservers, Set::addAll)); + if (push()) { + if (setable instanceof Observers) { + Observers os = (Observers) setable; + DefaultMap> baseObservers = StateMap.get(baseValues, os); + DefaultMap> resultObservers = StateMap.get(resultValues, os); + os.observed().checkTooManyObservers(universeTransaction(), object, resultObservers); + DefaultMap> addedResultObservers = resultObservers.removeAll(baseObservers, Set::removeAll); + if (!addedResultObservers.isEmpty()) { + Observed observedProp = os.observed(); + Object baseValue = StateMap.get(baseValues, observedProp); + for (DefaultMap branchValues : branchesValues) { + Object branchValue = StateMap.get(branchValues, observedProp); + if (!Objects.equals(branchValue, baseValue)) { + DefaultMap> branchObservers = StateMap.get(branchValues, os); + Map> missingBranchObservers = addedResultObservers.removeAll(branchObservers, Set::removeAll).// + asMap(e -> Entry.of(e.getKey(), e.getValue().map(m -> m.dResolve((Mutable) object)).asSet())); + triggeredActions.change(ts -> ts.addAll(missingBranchObservers, Set::addAll)); + } } } - } - } else if (setable instanceof Queued) { - Queued q = (Queued) setable; - Priority prio = base.priority(q); - if (prio != zero) { - Set resultTriggered = StateMap.get(resultValues, q); - Set baseTriggered = StateMap.get(baseValues, q); - if (!resultTriggered.removeAll(baseTriggered).isEmpty()) { - Mutable resultParent = StateMap.getA(resultValues, D_PARENT_CONTAINING); - if (resultParent != null) { - for (DefaultMap branchValues : branchesValues) { - Mutable branchParent = StateMap.getA(branchValues, D_PARENT_CONTAINING); - if (!resultParent.equals(branchParent)) { - triggeredMutables.change(prio, ts -> ts.add(resultParent)); - break; + } else if (setable instanceof Queued) { + Queued q = (Queued) setable; + Priority prio = base.priority(q); + if (prio != zero) { + Set resultTriggered = StateMap.get(resultValues, q); + Set baseTriggered = StateMap.get(baseValues, q); + if (!resultTriggered.removeAll(baseTriggered).isEmpty()) { + Mutable resultParent = StateMap.getA(resultValues, D_PARENT_CONTAINING); + if (resultParent != null) { + for (DefaultMap branchValues : branchesValues) { + Mutable branchParent = StateMap.getA(branchValues, D_PARENT_CONTAINING); + if (!resultParent.equals(branchParent)) { + triggeredMutables.change(prio, ts -> ts.add(resultParent)); + break; + } } } } } } } - } @SuppressWarnings({"rawtypes", "unchecked"}) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 9d43143f..f7e1a2e3 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -95,7 +95,7 @@ private void rollback(boolean atomic) { @Override protected final void run(State pre, UniverseTransaction universeTransaction) { Observer observer = observer(); - // check if the universe is still in the same transaction, if not: reset my state + // check if the universe is still in the same transaction run, if not: reset the counts of my observer observer.startTransaction(universeTransaction.stats()); // check if we should do the work... if (!observer.isStopped() && !universeTransaction.isKilled()) { @@ -345,7 +345,7 @@ public T getNonObserving(Supplier action) { @SuppressWarnings({"rawtypes", "unchecked", "RedundantSuppression"}) @Override - protected void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { if (observing(object, setable)) { changed.set(TRUE); } diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index e6fb9c44..783a3944 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -54,7 +54,8 @@ * This state will be the start state at the next invocation of this class and the method can (and will) be skipped. * This is meant for setting up a constant state in the universe that is used every time. * - * @param the Universe class for this repo + * @param + * the Universe class for this repo */ @SuppressWarnings("unused") public abstract class OneShot { @@ -65,9 +66,10 @@ public abstract class OneShot { private static final MutationWrapper, Set>> ALL_METHODS_CACHE = new MutationWrapper<>(Map.of()); private static final ContextPoolPool CONTEXT_POOL_POOL = new ContextPoolPool(); - private final Class cacheKey = getClass(); - private final U universe; - private State endState; + private final Class cacheKey = getClass(); + private final U universe; + private final boolean pull; + private State endState; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @@ -76,9 +78,9 @@ public abstract class OneShot { } @SuppressWarnings("DataFlowIssue") - public OneShot(U universe) { + public OneShot(U universe, boolean pull) { this.universe = universe; - + this.pull = pull; List cachingMethods = getAllMethodsOf(cacheKey).filter(m -> m.getAnnotation(OneShotAction.class).caching()).map(Method::getName).asList(); if (1 < cachingMethods.count()) { throw new IllegalStateException("the oneshot " + cacheKey.getSimpleName() + " has too many caching actions: " + cachingMethods.collect(Collectors.joining(", "))); @@ -140,11 +142,11 @@ public State getEndState() { if (endState == null) { ContextPool contextPool = getContextPool(); try { - StateMap cachedStateMap = STATE_MAP_CACHE.get().get(cacheKey); - boolean runningFromCache = cachedStateMap != null; - UniverseTransaction universeTransaction = new UniverseTransaction(getUniverse(), contextPool, getConfig(), null, cachedStateMap); - long t0 = System.nanoTime(); - List allActions = getAllActions(runningFromCache); + StateMap cachedStateMap = STATE_MAP_CACHE.get().get(cacheKey); + boolean runningFromCache = cachedStateMap != null; + UniverseTransaction universeTransaction = new UniverseTransaction(getUniverse(), contextPool, pull, getConfig(), null, cachedStateMap); + long t0 = System.nanoTime(); + List allActions = getAllActions(runningFromCache); trace("START", "#actions=%d", allActions.size()); allActions.forEach(a -> a.putAndWaitForIdle(universeTransaction)); universeTransaction.stop(); @@ -181,14 +183,14 @@ protected MyAction(Method method, boolean runningFromCache) { throw new Error(e); } }); - isCachingMethod = method.getAnnotation(OneShotAction.class).caching(); + isCachingMethod = method.getAnnotation(OneShotAction.class).caching(); this.runningFromCache = runningFromCache; } protected void putAndWaitForIdle(UniverseTransaction universeTransaction) { - long t0 = System.nanoTime(); + long t0 = System.nanoTime(); boolean writeResultToCache = isCachingMethod && !runningFromCache; - boolean skip = isCachingMethod && runningFromCache; + boolean skip = isCachingMethod && runningFromCache; if (skip) { trace(" CACHE-SKIP", "%s", id()); } else { @@ -201,10 +203,10 @@ protected void putAndWaitForIdle(UniverseTransaction universeTransaction) { STATE_MAP_CACHE.update(a -> a.computeIfAbsent(cacheKey, __ -> intermediateState.getStateMap())); } long overallNano = System.nanoTime() - t0; - long methodNano = durationNano(); - long dtOverall = nano2ms(overallNano); - long dtMethod = nano2ms(methodNano); - long dtRules = nano2ms(overallNano - methodNano); + long methodNano = durationNano(); + long dtOverall = nano2ms(overallNano); + long dtMethod = nano2ms(methodNano); + long dtRules = nano2ms(overallNano - methodNano); trace(" < computeAllMethodsOf(Class clazz) { for (Class c = clazz; c != Object.class; c = c.getSuperclass()) { for (Method m : c.getDeclaredMethods()) { if (m.isAnnotationPresent(OneShotAction.class) // - && m.getParameterCount() == 0// - && m.getReturnType().equals(void.class)// - && Modifier.isPublic(m.getModifiers())// - && !map.containsKey(m.getName())) {// + && m.getParameterCount() == 0// + && m.getReturnType().equals(void.class)// + && Modifier.isPublic(m.getModifiers())// + && !map.containsKey(m.getName())) {// map = map.put(m.getName(), m); } } @@ -251,21 +253,19 @@ private static long nano2ms(long nano) { } private static class ContextPoolPool { - private static final boolean NO_POOL_POOL_TRACE = Boolean.getBoolean("NO_POOL_POOL_TRACE"); - private static final int POOL_POOL_SIZE = Integer.getInteger("POOL_POOL_SIZE", Collection.PARALLELISM); - private static final int POOL_POOL_ALARM_THRESHOLD_SEC = Integer.getInteger("POOL_POOL_ALARM_THRESHOLD_SEC", 30); - private static final int POOL_POOL_AQUIRE_TIMEOUT_SEC = Integer.getInteger("POOL_POOL_AQUIRE_TIMEOUT_SEC", 30); - private static final int POOL_POOL_MONITOR_INTERVAL_SEC = Integer.getInteger("POOL_POOL_MONITOR_INTERVAL_SEC", 60); + private static final boolean NO_POOL_POOL_TRACE = Boolean.getBoolean("NO_POOL_POOL_TRACE"); + private static final int POOL_POOL_SIZE = Integer.getInteger("POOL_POOL_SIZE", Collection.PARALLELISM); + private static final int POOL_POOL_ALARM_THRESHOLD_SEC = Integer.getInteger("POOL_POOL_ALARM_THRESHOLD_SEC", 30); + private static final int POOL_POOL_AQUIRE_TIMEOUT_SEC = Integer.getInteger("POOL_POOL_AQUIRE_TIMEOUT_SEC", 30); + private static final int POOL_POOL_MONITOR_INTERVAL_SEC = Integer.getInteger("POOL_POOL_MONITOR_INTERVAL_SEC", 60); // - private final BlockingQueue idleQueue = new LinkedBlockingQueue<>(makePools()); - private final BlockingQueue busyQueue = new LinkedBlockingQueue<>(); - private final AtomicReference poolPoolInfo = new AtomicReference<>(new PoolPoolInfo()); - private final java.util.Map poolInfoMap; + private final BlockingQueue idleQueue = new LinkedBlockingQueue<>(makePools()); + private final BlockingQueue busyQueue = new LinkedBlockingQueue<>(); + private final AtomicReference poolPoolInfo = new AtomicReference<>(new PoolPoolInfo()); + private final java.util.Map poolInfoMap; private static java.util.Collection makePools() { - return IntStream.range(0, POOL_POOL_SIZE) - .mapToObj(i -> new PoolInfo()) - .toList(); + return IntStream.range(0, POOL_POOL_SIZE).mapToObj(i -> new PoolInfo()).toList(); } public ContextPoolPool() { @@ -282,9 +282,9 @@ public ContextPool getContextPool() { try { PoolPoolInfo.preUpdate(poolPoolInfo); trace("get"); - long t0 = System.nanoTime(); + long t0 = System.nanoTime(); PoolInfo info = idleQueue.poll(POOL_POOL_AQUIRE_TIMEOUT_SEC, TimeUnit.SECONDS); - long dt = (System.nanoTime() - t0) / 1_000_000; + long dt = (System.nanoTime() - t0) / 1_000_000; if (info == null) { trace("timeout"); throw new RuntimeException("timeout after " + dt + " ms while waiting for ContextPool"); @@ -316,12 +316,7 @@ public boolean doneWithContextPool(ContextPool pool) { private void trace(String msg) { if (!NO_POOL_POOL_TRACE) { - System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", - Thread.currentThread().getName(), - msg, - idleQueue.size(), - busyQueue.size(), - poolPoolInfo.get()); + System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", Thread.currentThread().getName(), msg, idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); } } @@ -348,7 +343,7 @@ private PoolPoolMonitor(ContextPoolPool contextPoolPool) { @SuppressWarnings("BusyWait") @Override public void run() { - for (; ; ) { + for (;;) { try { Thread.sleep(POOL_POOL_MONITOR_INTERVAL_SEC * 1000L); contextPoolPool.check(); @@ -362,9 +357,9 @@ public void run() { private static class PoolInfo { private final ContextPool pool; - private boolean busy; - private long startTick; - private long lastDuration; + private boolean busy; + private long startTick; + private long lastDuration; public PoolInfo() { pool = ContextThread.createPool(); @@ -376,15 +371,15 @@ public PoolInfo() { } public void start() { - busy = true; + busy = true; lastDuration = 0; - startTick = System.currentTimeMillis(); + startTick = System.currentTimeMillis(); } public void stop() { - busy = false; + busy = false; lastDuration = duration(); - startTick = 0; + startTick = 0; } public long duration() { @@ -401,11 +396,11 @@ private static class PoolPoolInfo { private final long maxWaitTime; public PoolPoolInfo() { - this.gets = 0; - this.immediates = 0; - this.waits = 0; + this.gets = 0; + this.immediates = 0; + this.waits = 0; this.totalWaitTime = 0; - this.maxWaitTime = 0; + this.maxWaitTime = 0; } public static void preUpdate(AtomicReference poolPoolInfo) { @@ -417,7 +412,7 @@ public static void postUpdate(AtomicReference poolPoolInfo, long d } private static void update(AtomicReference poolPoolInfo, Function f) { - for (; ; ) { + for (;;) { PoolPoolInfo oldInfo = poolPoolInfo.get(); PoolPoolInfo newInfo = f.apply(oldInfo); if (poolPoolInfo.compareAndSet(oldInfo, newInfo)) { @@ -427,21 +422,16 @@ private static void update(AtomicReference poolPoolInfo, Function< } private PoolPoolInfo(long gets, long immediates, long waits, long totalWaitTime, long maxWaitTime) { - this.gets = gets; - this.immediates = immediates; - this.waits = waits; + this.gets = gets; + this.immediates = immediates; + this.waits = waits; this.totalWaitTime = totalWaitTime; - this.maxWaitTime = maxWaitTime; + this.maxWaitTime = maxWaitTime; } @Override public String toString() { - return String.format("%4d gets (%4d immediates %4d waits %8d ms totalWait, %8d ms max-wait)", - gets, - immediates, - waits, - totalWaitTime, - maxWaitTime); + return String.format("%4d gets (%4d immediates %4d waits %8d ms totalWait, %8d ms max-wait)", gets, immediates, waits, totalWaitTime, maxWaitTime); } } } diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index d3edbd47..31f3b4ec 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -66,7 +66,7 @@ public State state() { } @Override - protected void changed(O object, Setable property, T preValue, T rawPreValue, T postValue) { + public void changed(O object, Setable property, T preValue, T rawPreValue, T postValue) { if (property instanceof Constant) { if (property.isHandlingChange()) { universeTransaction().put(new Object(), () -> super.changed(object, property, preValue, rawPreValue, postValue)); diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index 9b947f95..fb50a27b 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -220,24 +220,31 @@ protected final void changed(LeafTransaction tx, O object, T preValue, T postVal changed.accept(tx, object, preValue, postValue); } if (containment) { + boolean push = tx.push(); Setable. diff(preValue, postValue, added -> { Pair> prePair = tx.getRaw(added, Mutable.D_PARENT_CONTAINING); if (prePair != null) { MOVING.run(true, () -> prePair.b().remove(prePair.a(), added)); } Mutable.D_PARENT_CONTAINING.set(added, Pair.of((Mutable) object, (Setable) this)); - if (prePair == null) { - added.dActivate(); - } else { - tx.set((Mutable) object, tx.state().children(one), Set::add, added); + if (push) { + if (prePair == null) { + added.dActivate(); + } else { + tx.set((Mutable) object, tx.state().children(one), Set::add, added); + } } }, removed -> { - for (Priority prio : Priority.ALL) { - tx.set((Mutable) object, tx.state().children(prio), Set::remove, removed); + if (push) { + for (Priority prio : Priority.ALL) { + tx.set((Mutable) object, tx.state().children(prio), Set::remove, removed); + } } if (!MOVING.get()) { Mutable.D_PARENT_CONTAINING.setDefault(removed); - removed.dHandleRemoved((Mutable) object); + if (push) { + removed.dHandleRemoved((Mutable) object); + } } }); } diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index 0d0ca072..b3342492 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -266,7 +266,16 @@ public void run(Runnable action) { public R derive(Supplier supplier, ConstantState constantState) { DerivationTransaction tx = universeTransaction.derivation.openTransaction(universeTransaction); try { - return tx.derive(supplier, this, constantState); + return tx.derive(supplier, this, constantState, tx); + } finally { + universeTransaction.derivation.closeTransaction(tx); + } + } + + public R derive(Supplier supplier, ConstantState constantState, ConstantChangeHandler changeHandler) { + DerivationTransaction tx = universeTransaction.derivation.openTransaction(universeTransaction); + try { + return tx.derive(supplier, this, constantState, changeHandler); } finally { universeTransaction.derivation.closeTransaction(tx); } @@ -285,7 +294,7 @@ public State deriveLazy() { ConstantState derivationState = new ConstantState("LAZY", universeTransaction::handleException); LazyDerivationTransaction tx = universeTransaction.lazyDerivation.openTransaction(universeTransaction); try { - return tx.derive(() -> tx.derive(), this, derivationState); + return tx.derive(() -> tx.derive(), this, derivationState, tx); } finally { derivationState.stop(); universeTransaction.lazyDerivation.closeTransaction(tx); diff --git a/src/main/java/org/modelingvalue/dclare/Transaction.java b/src/main/java/org/modelingvalue/dclare/Transaction.java index c6fad5dc..68bb2525 100644 --- a/src/main/java/org/modelingvalue/dclare/Transaction.java +++ b/src/main/java/org/modelingvalue/dclare/Transaction.java @@ -60,6 +60,14 @@ public UniverseTransaction universeTransaction() { return universeTransaction; } + public boolean pull() { + return universeTransaction.pull(); + } + + public boolean push() { + return universeTransaction.push(); + } + public void start(TransactionClass cls, MutableTransaction parent) { if (this.cls != null) { throw new ConcurrentModificationException(); diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index 01b89e30..06bb3399 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -24,8 +24,11 @@ public interface Universe extends Mutable, Internable { default void init() { - LeafTransaction.getCurrent().universeTransaction().setInitialized(); - dActivate(); + UniverseTransaction universeTransaction = LeafTransaction.getCurrent().universeTransaction(); + universeTransaction.setInitialized(); + if (universeTransaction.push()) { + dActivate(); + } } default void exit() { @@ -36,4 +39,11 @@ default void exit() { default boolean dIsOrphan(State state) { return false; } + + @Override + public default boolean pull() { + for (boolean incomplete = Mutable.super.pull(); incomplete; incomplete = Mutable.super.pull()) { + } + return false; + } } diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index fcc76998..2b2beded 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -20,6 +20,16 @@ package org.modelingvalue.dclare; +import java.util.Iterator; +import java.util.Objects; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; +import java.util.function.Predicate; + import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.DefaultMap; import org.modelingvalue.collections.Entry; @@ -36,16 +46,6 @@ import org.modelingvalue.dclare.ex.ConsistencyError; import org.modelingvalue.dclare.ex.TooManyChangesException; -import java.util.Iterator; -import java.util.Objects; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; -import java.util.function.Predicate; - @SuppressWarnings("unused") public class UniverseTransaction extends MutableTransaction { @@ -70,6 +70,7 @@ public class UniverseTransaction extends MutableTransaction { private final Action checkConsistency = Action.of("$checkConsistency", this::checkConsistency); private final Action deriveLazy = Action.of("$deriveLazy", this::deriveLazy); // + private final boolean pull; protected final BlockingQueue> inQueue; private final BlockingQueue resultQueue = new LinkedBlockingQueue<>(1); //TODO wire onto MoodManager private final State emptyState = createState(StateMap.EMPTY_STATE_MAP); @@ -163,11 +164,12 @@ public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig con } public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig config, Consumer startStatusConsumer) { - this(universe, pool, config, startStatusConsumer, null); + this(universe, pool, false, config, startStatusConsumer, null); } - public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig config, Consumer startStatusConsumer, StateMap startStateMap) { + public UniverseTransaction(Universe universe, ContextPool pool, boolean pull, DclareConfig config, Consumer startStatusConsumer, StateMap startStateMap) { super(null); + this.pull = pull; if (universe == null) { throw new IllegalArgumentException("UniverseTransaction can not start without a Universe (universe argument is null)"); } @@ -196,6 +198,16 @@ public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig con } } + @Override + public final boolean pull() { + return pull; + } + + @Override + public final boolean push() { + return !pull; + } + private State createStartState(Universe universe, StateMap stateMap) { if (stateMap != null) { // take care that the startStateMap does not contain the STOPPED state diff --git a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java new file mode 100644 index 00000000..c8af418a --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java @@ -0,0 +1,5 @@ +package org.modelingvalue.dclare.ex; + +public class NotYetDerivableException extends RuntimeException { + private static final long serialVersionUID = -9138263608521723722L; +} diff --git a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java index 200cc17a..d1f801c9 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java @@ -20,24 +20,15 @@ package org.modelingvalue.dclare.test.support; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.modelingvalue.collections.Collection; -import org.modelingvalue.dclare.Mutable; -import org.modelingvalue.dclare.MutableClass; -import org.modelingvalue.dclare.Observed; -import org.modelingvalue.dclare.Observer; -import org.modelingvalue.dclare.OneShot; -import org.modelingvalue.dclare.Setable; -import org.modelingvalue.dclare.StateMap; -import org.modelingvalue.dclare.Universe; +import static org.modelingvalue.dclare.test.support.OneShotTests.TestUniverse.*; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; -import static org.modelingvalue.dclare.test.support.OneShotTests.TestUniverse.BASE; -import static org.modelingvalue.dclare.test.support.OneShotTests.TestUniverse.ELSE; -import static org.modelingvalue.dclare.test.support.OneShotTests.TestUniverse.STAR; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.modelingvalue.collections.Collection; +import org.modelingvalue.dclare.*; public class OneShotTests { static { @@ -47,17 +38,20 @@ public class OneShotTests { private static final String MARKER = "xyzzy"; private static final String SEP = "-"; + private Random random = new Random(); + @Test public void reuseInOneTest() { AtomicInteger invokes1 = new AtomicInteger(); AtomicInteger invokes2 = new AtomicInteger(); for (int i = 0; i < 100; i++) { - boolean starred = new Random().nextBoolean(); - TestOneShotInOne oneShot2 = new TestOneShotInOne(starred, i, invokes1, invokes2); - StateMap map2 = oneShot2.getEndStateMap(); + boolean starred = random.nextBoolean(); + boolean pull = random.nextBoolean(); + TestOneShotInOne oneShot2 = new TestOneShotInOne(pull, starred, i, invokes1, invokes2); + StateMap map2 = oneShot2.getEndStateMap(); - Observed updated = starred ? STAR : ELSE; + Observed updated = starred ? STAR : ELSE; Observed notUpdated = starred ? ELSE : STAR; Assertions.assertEquals(MARKER, map2.get(TEST_UNIVERSE, BASE), "at " + i); @@ -76,10 +70,10 @@ public static class TestOneShotInOne extends OneShot { private final AtomicInteger invokes1; private final AtomicInteger invokes2; - public TestOneShotInOne(boolean starred, int end, AtomicInteger invokes1, AtomicInteger invokes2) { - super(TEST_UNIVERSE); - this.starred = starred; - this.end = end; + public TestOneShotInOne(boolean pull, boolean starred, int end, AtomicInteger invokes1, AtomicInteger invokes2) { + super(TEST_UNIVERSE, pull); + this.starred = starred; + this.end = end; this.invokes1 = invokes1; this.invokes2 = invokes2; } @@ -105,16 +99,16 @@ public static class TestUniverse implements Universe { public static final Observed STAR = Observed.of("STAR", null); public static final Observed ELSE = Observed.of("ELSE", null); public static final MutableClass D_CLASS = new MutableClass() { - @Override - public Collection> dObservers() { - return Collection.of(); - } - - @Override - public Collection> dSetables() { - return Collection.of(); - } - }; + @Override + public Collection> dObservers() { + return Collection.of(); + } + + @Override + public Collection> dSetables() { + return Collection.of(BASE, STAR, ELSE); + } + }; @Override public MutableClass dClass() { From fef31dd1f48b4100d4b8ba997d88a16d1dfc6641 Mon Sep 17 00:00:00 2001 From: automation Date: Mon, 4 Mar 2024 13:13:47 +0000 Subject: [PATCH 032/179] [no-ci] updated by mvgplugin --- .../dclare/ConstantChangeHandler.java | 20 +++++++++++++++++++ .../dclare/ex/NotYetDerivableException.java | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java b/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java index 87a1e5db..f1aa5673 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare; public interface ConstantChangeHandler { diff --git a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java index c8af418a..c77f1097 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare.ex; public class NotYetDerivableException extends RuntimeException { From 70aaf8620db7a7b2e7dffb64efa944549d257ee7 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Sun, 10 Mar 2024 09:48:37 +0100 Subject: [PATCH 033/179] copilot ignore --- .idea/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.idea/.gitignore b/.idea/.gitignore index b58b603f..7abb13d0 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -3,3 +3,5 @@ /workspace.xml # Editor-based HTTP Client requests /httpRequests/ +# GitHub Copilot persisted chat sessions +/copilot/chatSessions From 916b8dea7cd4e5c9594efec6d42f5df5ab28692e Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 11 Mar 2024 16:55:13 +0100 Subject: [PATCH 034/179] push pull --- .../dclare/AbstractDerivationTransaction.java | 33 +++++++---- .../dclare/ActionTransaction.java | 7 ++- .../dclare/ConstantChangeHandler.java | 2 + .../modelingvalue/dclare/ConstantState.java | 14 +++++ .../dclare/IdentityDerivationTransaction.java | 4 +- .../dclare/ImperativeTransaction.java | 2 +- .../dclare/LazyDerivationTransaction.java | 9 +-- .../modelingvalue/dclare/LeafTransaction.java | 24 +++++--- .../org/modelingvalue/dclare/Mutable.java | 36 +++++------ .../modelingvalue/dclare/MutableClass.java | 4 ++ .../org/modelingvalue/dclare/Newable.java | 4 +- .../org/modelingvalue/dclare/OneShot.java | 59 +++++++++++-------- .../dclare/ReadOnlyTransaction.java | 2 +- .../org/modelingvalue/dclare/Setable.java | 22 +++---- .../org/modelingvalue/dclare/Universe.java | 15 +---- .../dclare/UniverseTransaction.java | 19 ++++-- 16 files changed, 152 insertions(+), 104 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 7617bb10..6057ea1e 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -41,6 +41,7 @@ public abstract class AbstractDerivationTransaction extends ReadOnlyTransaction @SuppressWarnings("rawtypes") private static final Context DERIVED_VALUE = Context.of(null); private static final Context INDENT = Context.of(0); + private static final Context DERIVE = Context.of(true); public static boolean isDeriving() { return !DERIVED.get().isEmpty(); @@ -68,8 +69,13 @@ public R derive(Supplier action, State state, ConstantState memoization, } @SuppressWarnings("rawtypes") - protected boolean doDerive(O object, Getable getable, T nonDerived) { - return object instanceof Mutable && getable instanceof Observed; + protected boolean doDeriveGet(O object, Getable getable, T nonDerived) { + return object instanceof Mutable && getable instanceof Observed && DERIVE.get(); + } + + @SuppressWarnings("rawtypes") + protected boolean doDeriveSet(O object, Getable getable, T nonDerived) { + return object instanceof Mutable && getable instanceof Observed && isDeriving(); } protected T getNonDerived(O object, Getable getable) { @@ -90,7 +96,7 @@ protected T current(O object, Getable getable) { @SuppressWarnings({"rawtypes", "unchecked"}) private T derive(O object, Getable getable, T nonDerived) { - if (doDerive(object, getable, nonDerived)) { + if (doDeriveGet(object, getable, nonDerived)) { Observed observed = (Observed) getable; DerivedValue outerDerivedValue = DERIVED_VALUE.get(); boolean isDerived = outerDerivedValue != null && outerDerivedValue.isDerived(object, observed); @@ -117,11 +123,7 @@ private T derive(O object, Getable getable, T nonDerived) { DerivedValue innerDerivedValue = new DerivedValue(object, observed); INDENT.run(INDENT.get() + 1, () -> DERIVED.run(newDerived, () -> DERIVED_VALUE.run(innerDerivedValue, () -> { int i = 0; - Set observers = ((Mutable) object).dAllDerivers(observed).asSet(); - for (Observer observer : observers.filter(Observer::anonymous)) { - runDeriver((Mutable) object, observed, observer, ++i); - } - for (Observer observer : observers.exclude(Observer::anonymous)) { + for (Observer observer : ((Mutable) object).dAllDerivers(observed)) { runDeriver((Mutable) object, observed, observer, ++i); } if (innerDerivedValue.isSet()) { @@ -180,12 +182,12 @@ public T set(O object, Setable setable, T post) { } public void runNonDeriving(Runnable action) { - DERIVED.run(Set.of(), action); + DERIVE.run(false, action); } @SuppressWarnings({"unchecked", "rawtypes"}) private T set(O object, Setable setable, T post, T nonDerived) { - if (doDerive(object, setable, nonDerived) && isDeriving()) { + if (doDeriveSet(object, setable, nonDerived)) { Observed observed = (Observed) setable; DerivedValue derivedValue = DERIVED_VALUE.get(); boolean isDerived = derivedValue != null && derivedValue.isDerived(object, observed); @@ -212,7 +214,7 @@ Setable. diff(pre, result, added -> { } return pre; } else if (!Objects.equals(nonDerived, post)) { - return changeHandler.set(object, setable, post); + return changeHandler == this ? super.set(object, setable, post) : changeHandler.set(object, setable, post); } else { return post; } @@ -259,6 +261,11 @@ private T replace(T post, Newable po, Newable pr) { return post; } + @Override + public void trigger(O mutable, Action action, Priority priority) { + changeHandler.trigger(mutable, action, priority); + } + @Override public O directConstruct(Construction.Reason reason, Supplier supplier) { return super.construct(reason, supplier); @@ -275,8 +282,8 @@ public O construct(Reason reason, Supplier supplier) { return result; } - protected void setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { - mem.set(changeHandler, object, setable.constant(), result, force); + protected T setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { + return force ? mem.set(changeHandler, object, setable.constant(), result, force) : mem.getOrSet(changeHandler, object, setable.constant(), result); } protected ConstantState memoization(O object) { diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 4ccf5ac5..d9621a65 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -55,6 +55,11 @@ public State state() { public T set(O object, Setable property, T post) { return ActionTransaction.this.set(object, property, post); } + + @Override + public void trigger(O mutable, Action action, Priority priority) { + ActionTransaction.this.trigger(mutable, action, priority); + } }; @SuppressWarnings("unchecked") private final Supplier supplier = () -> { @@ -78,7 +83,7 @@ protected void run(State pre, UniverseTransaction universeTransaction) { if (push()) { ((Action) action()).run(mutable()); } else { - state().derive(supplier, constantState(), changeHandler); + state().derive(supplier, pullConstantState(), changeHandler); } } diff --git a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java b/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java index f1aa5673..9ce888dc 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java @@ -28,4 +28,6 @@ public interface ConstantChangeHandler { State state(); + void trigger(O mutable, Action action, Priority priority); + } diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 355f1cc1..c40432f6 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -170,6 +170,16 @@ public boolean isSet(Constant constant) { return constants.get(constant) != null; } + @SuppressWarnings("unchecked") + public V getOrSet(ConstantChangeHandler cch, O object, Constant constant, V soll) { + Map, Object> prev = constants; + V ist = (V) prev.get(constant); + if (ist == null) { + ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, false); + } + return ist; + } + @SuppressWarnings("unchecked") public V set(ConstantChangeHandler cch, O object, Constant constant, V soll, boolean forced) { Map, Object> prev = constants; @@ -310,6 +320,10 @@ public boolean isSet(ConstantChangeHandler cch, O object, Constant return getConstants(cch, object, referenceType(constant)).isSet(constant); } + public V getOrSet(ConstantChangeHandler cch, O object, Constant constant, V value) { + return getConstants(cch, object, referenceType(constant)).getOrSet(cch, object, constant, value); + } + public V set(ConstantChangeHandler cch, O object, Constant constant, V value, boolean forced) { return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, value, forced); } diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index ad707024..3e94e2a7 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -45,8 +45,8 @@ public R derive(Supplier action, State state, int depth, Mutable contextM } @Override - protected boolean doDerive(O object, Getable getable, T nonDerived) { - return super.doDerive(object, getable, nonDerived) && !isChanged(object, getable); + protected boolean doDeriveGet(O object, Getable getable, T nonDerived) { + return super.doDeriveGet(object, getable, nonDerived) && !isChanged(object, getable); } @SuppressWarnings("unchecked") diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 49528869..4e0f8fe8 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -181,7 +181,7 @@ private void imper2dclare() { } @Override - protected void trigger(O target, Action action, Priority priority) { + public void trigger(O target, Action action, Priority priority) { set(target, state.actions(priority), Set::add, action); } diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java index 6678bbb4..c7998163 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java @@ -78,8 +78,8 @@ private RecursiveAction getAction(Mutable mutable) { } @Override - protected boolean doDerive(O object, Getable getable, T nonDerived) { - return super.doDerive(object, getable, nonDerived) && Objects.equals(nonDerived, getable.getDefault(object)) && ifReady(object, (Setable) getable, nonDerived); + protected boolean doDeriveGet(O object, Getable getable, T nonDerived) { + return super.doDeriveGet(object, getable, nonDerived) && Objects.equals(nonDerived, getable.getDefault(object)) && ifReady(object, (Setable) getable, nonDerived); } private boolean ifReady(O object, Setable setable, T nonDerived) { @@ -90,11 +90,12 @@ private boolean ifReady(O object, Setable setable, T nonDerived) { } @Override - protected void setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { - super.setInMemoization(mem, object, setable, result, force); + protected T setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { + result = super.setInMemoization(mem, object, setable, result, force); if (!force && setable.preserved() && !setable.direction().isLazy()) { state.set(object, setable, result); } + return result; } private static final class DeriveAction extends RecursiveAction { diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index d8238c47..90ffd42c 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -120,6 +120,17 @@ public void changed(O object, Setable setable, T preValue, T rawPre setable.changed(this, object, rawPreValue, postValue); } + protected final void dActivate(Mutable added) { + added.dActivate(this); + added.dChildren().forEach(this::dActivate); + } + + protected final void dDeactivate(Mutable orphan) { + orphan.dDeactivate(this); + clear(orphan); + orphan.dChildren().forEach(this::dDeactivate); + } + @SuppressWarnings({"rawtypes", "unchecked"}) public void clear(Mutable object) { for (Setable setable : toBeCleared(object)) { @@ -127,18 +138,13 @@ public void clear(Mutable object) { } } - protected final void clearOrphan(Mutable orphan) { - orphan.dDeactivate(this); - clear(orphan); - orphan.dChildren().forEach(this::clearOrphan); - } - @SuppressWarnings("rawtypes") protected Collection toBeCleared(Mutable object) { return state().getProperties(object).map(Entry::getKey).exclude(Setable::doNotClear); } - protected void trigger(O target, Action action, Priority priority) { + @Override + public void trigger(O target, Action action, Priority priority) { Mutable object = target; set(object, state().actions(priority), Set::add, action); for (int i = priority.ordinal() + 1; i < ALL.length; i++) { @@ -202,6 +208,10 @@ protected ConstantState constantState() { return universeTransaction().constantState(); } + protected ConstantState pullConstantState() { + return universeTransaction().pullConstantState(); + } + public O directConstruct(Construction.Reason reason, Supplier supplier) { return construct(reason, supplier); } diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 85b6f004..f7d579af 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -32,7 +32,6 @@ import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.dclare.Observer.Constructed; -import org.modelingvalue.dclare.ex.NotYetDerivableException; @SuppressWarnings("unused") public interface Mutable extends TransactionClass { @@ -75,6 +74,11 @@ Setable., Construction> diff(b, a, }); }, plumbing, doNotMerge); + @SuppressWarnings("unchecked") + Action D_PUSH_IF_PULL_ACTION = Action.of("D_PUSH_IF_PULL_ACTION", m -> { + MutableClass.D_PUSH_IF_PULL.get(m.dClass()).forEach(o -> o.get(m)); + }); + default Construction dInitialConstruction() { return D_INITIAL_CONSTRUCTION.get(this); } @@ -167,18 +171,21 @@ default T dParent(Class cls) { return cls.isInstance(p) ? (T) p : null; } - default void dActivate() { - D_OBSERVERS_RULE.trigger(this); - D_PUSHING_CONSTANTS_RULE.trigger(this); - for (Mutable child : dChildren()) { - child.dActivate(); + default void dActivate(LeafTransaction tx) { + if (tx.push()) { + D_OBSERVERS_RULE.trigger(this); + D_PUSHING_CONSTANTS_RULE.trigger(this); + } else if (!MutableClass.D_PUSH_IF_PULL.get(dClass()).isEmpty()) { + D_PUSH_IF_PULL_ACTION.trigger(this); } } default void dDeactivate(LeafTransaction tx) { - D_OBSERVERS_RULE.deObserve(tx, this); - D_PUSHING_CONSTANTS_RULE.deObserve(tx, this); - D_OBSERVERS.setDefault(this); + if (tx.push()) { + D_OBSERVERS_RULE.deObserve(tx, this); + D_PUSHING_CONSTANTS_RULE.deObserve(tx, this); + D_OBSERVERS.setDefault(this); + } } MutableClass dClass(); @@ -265,15 +272,4 @@ private ParentContaining(Object id, SetableModifier... modifiers) { } } - @SuppressWarnings("unchecked") - public default boolean pull() { - return MutableClass.D_OBSERVEDS.get(dClass()).map(o -> { - try { - o.get(this); - } catch (NotYetDerivableException nyde) { - return true; - } - return false; - }).reduce(false, (a, b) -> a || b); - } } diff --git a/src/main/java/org/modelingvalue/dclare/MutableClass.java b/src/main/java/org/modelingvalue/dclare/MutableClass.java index 5ab550e0..79419600 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableClass.java +++ b/src/main/java/org/modelingvalue/dclare/MutableClass.java @@ -51,6 +51,10 @@ public interface MutableClass extends Internable { Constant> D_NON_DERIVERS = Constant.of("D_NON_DERIVERS", // c -> c.dObservers().filter(o -> o.targets().isEmpty()).map(s -> (Observer) s).asSet()); + @SuppressWarnings({"rawtypes"}) + Constant> D_PUSH_IF_PULL = Constant.of("D_PUSH_IF_PULL", // + c -> D_OBSERVEDS.get(c).filter(o -> o.containment() || o.hasOpposite()).filter(o -> !D_DERIVERS.get(c).get(o).isEmpty()).asSet()); + Collection> dObservers(); Collection> dSetables(); diff --git a/src/main/java/org/modelingvalue/dclare/Newable.java b/src/main/java/org/modelingvalue/dclare/Newable.java index 03efced2..c1a2ad08 100644 --- a/src/main/java/org/modelingvalue/dclare/Newable.java +++ b/src/main/java/org/modelingvalue/dclare/Newable.java @@ -33,8 +33,8 @@ public interface Newable extends Mutable { Object dNewableType(); @Override - default void dActivate() { - Mutable.super.dActivate(); + default void dActivate(LeafTransaction tx) { + Mutable.super.dActivate(tx); } @Override diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 783a3944..38a220fb 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -28,8 +28,8 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Comparator; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.BlockingDeque; +import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -59,17 +59,18 @@ */ @SuppressWarnings("unused") public abstract class OneShot { - private static final boolean TRACE_ONE_SHOT = Boolean.getBoolean("TRACE_ONE_SHOT"); - private static final String TRACE_ONE_SHOT_OBJECT = System.getProperty("TRACE_ONE_SHOT_OBJECT"); - private static final String TRACE_ONE_SHOT_SETABLE = System.getProperty("TRACE_ONE_SHOT_SETABLE"); - private static final MutationWrapper, StateMap>> STATE_MAP_CACHE = new MutationWrapper<>(Map.of()); - private static final MutationWrapper, Set>> ALL_METHODS_CACHE = new MutationWrapper<>(Map.of()); - private static final ContextPoolPool CONTEXT_POOL_POOL = new ContextPoolPool(); - - private final Class cacheKey = getClass(); - private final U universe; - private final boolean pull; - private State endState; + private static final boolean TRACE_ONE_SHOT = Boolean.getBoolean("TRACE_ONE_SHOT"); + private static final String TRACE_ONE_SHOT_OBJECT = System.getProperty("TRACE_ONE_SHOT_OBJECT"); + private static final String TRACE_ONE_SHOT_SETABLE = System.getProperty("TRACE_ONE_SHOT_SETABLE"); + private static final MutationWrapper, StateMap>> STATE_MAP_CACHE = new MutationWrapper<>(Map.of()); + private static final MutationWrapper, Set>> ALL_METHODS_CACHE = new MutationWrapper<>(Map.of()); + private static final MutationWrapper, ConstantState>> CONSTANT_STATE_CACHE = new MutationWrapper<>(Map.of()); + private static final ContextPoolPool CONTEXT_POOL_POOL = new ContextPoolPool(); + + private final Class cacheKey = getClass(); + private final U universe; + private final boolean pull; + private State endState; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @@ -81,10 +82,6 @@ public abstract class OneShot { public OneShot(U universe, boolean pull) { this.universe = universe; this.pull = pull; - List cachingMethods = getAllMethodsOf(cacheKey).filter(m -> m.getAnnotation(OneShotAction.class).caching()).map(Method::getName).asList(); - if (1 < cachingMethods.count()) { - throw new IllegalStateException("the oneshot " + cacheKey.getSimpleName() + " has too many caching actions: " + cachingMethods.collect(Collectors.joining(", "))); - } } /** @@ -126,6 +123,7 @@ public StateMap getEndStateMap() { public void clearCache() { STATE_MAP_CACHE.update(m -> m.remove(cacheKey)); + CONSTANT_STATE_CACHE.update(m -> m.remove(cacheKey)); } /** @@ -142,15 +140,19 @@ public State getEndState() { if (endState == null) { ContextPool contextPool = getContextPool(); try { + long t0 = System.nanoTime(); StateMap cachedStateMap = STATE_MAP_CACHE.get().get(cacheKey); + ConstantState cachedConstantState = CONSTANT_STATE_CACHE.get().get(cacheKey); boolean runningFromCache = cachedStateMap != null; - UniverseTransaction universeTransaction = new UniverseTransaction(getUniverse(), contextPool, pull, getConfig(), null, cachedStateMap); - long t0 = System.nanoTime(); + UniverseTransaction universeTransaction = new UniverseTransaction(getUniverse(), contextPool, pull, getConfig(), null, cachedStateMap, cachedConstantState); List allActions = getAllActions(runningFromCache); trace("START", "#actions=%d", allActions.size()); allActions.forEach(a -> a.putAndWaitForIdle(universeTransaction)); universeTransaction.stop(); endState = universeTransaction.waitForEnd(); + if (cachedConstantState == null) { + CONSTANT_STATE_CACHE.update(a -> a.computeIfAbsent(cacheKey, __ -> universeTransaction.constantState())); + } trace("DONE", "duration=%5d ms", nano2ms(System.nanoTime() - t0)); } finally { doneWithContextPool(contextPool); @@ -223,7 +225,14 @@ private static void traceDiff(State intermediateState) { } private static Set getAllMethodsOf(Class clazz) { - return ALL_METHODS_CACHE.updateAndGet(a -> a.computeIfAbsent(clazz, __ -> computeAllMethodsOf(clazz))).get(clazz); + return ALL_METHODS_CACHE.updateAndGet(a -> a.computeIfAbsent(clazz, __ -> { + Set methods = computeAllMethodsOf(clazz); + List cachingMethods = methods.filter(m -> m.getAnnotation(OneShotAction.class).caching()).map(Method::getName).asList(); + if (1 < cachingMethods.count()) { + throw new IllegalStateException("the oneshot " + clazz.getSimpleName() + " has too many caching actions: " + cachingMethods.collect(Collectors.joining(", "))); + } + return methods; + })).get(clazz); } private static Set computeAllMethodsOf(Class clazz) { @@ -259,8 +268,8 @@ private static class ContextPoolPool { private static final int POOL_POOL_AQUIRE_TIMEOUT_SEC = Integer.getInteger("POOL_POOL_AQUIRE_TIMEOUT_SEC", 30); private static final int POOL_POOL_MONITOR_INTERVAL_SEC = Integer.getInteger("POOL_POOL_MONITOR_INTERVAL_SEC", 60); // - private final BlockingQueue idleQueue = new LinkedBlockingQueue<>(makePools()); - private final BlockingQueue busyQueue = new LinkedBlockingQueue<>(); + private final BlockingDeque idleQueue = new LinkedBlockingDeque<>(makePools()); + private final BlockingDeque busyQueue = new LinkedBlockingDeque<>(); private final AtomicReference poolPoolInfo = new AtomicReference<>(new PoolPoolInfo()); private final java.util.Map poolInfoMap; @@ -283,7 +292,7 @@ public ContextPool getContextPool() { PoolPoolInfo.preUpdate(poolPoolInfo); trace("get"); long t0 = System.nanoTime(); - PoolInfo info = idleQueue.poll(POOL_POOL_AQUIRE_TIMEOUT_SEC, TimeUnit.SECONDS); + PoolInfo info = idleQueue.pollFirst(POOL_POOL_AQUIRE_TIMEOUT_SEC, TimeUnit.SECONDS); long dt = (System.nanoTime() - t0) / 1_000_000; if (info == null) { trace("timeout"); @@ -291,7 +300,7 @@ public ContextPool getContextPool() { } PoolPoolInfo.postUpdate(poolPoolInfo, dt); info.start(); - busyQueue.add(info); + busyQueue.addFirst(info); trace(String.format("waited %6d ms", dt)); return info.pool; } catch (InterruptedException e) { @@ -309,7 +318,7 @@ public boolean doneWithContextPool(ContextPool pool) { throw new IllegalStateException("pool not busy"); } info.stop(); - idleQueue.add(info); + idleQueue.addFirst(info); trace("done"); return true; } diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index 31f3b4ec..65d6c802 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -97,7 +97,7 @@ public ActionInstance actionInstance() { } @Override - protected void trigger(O mutable, Action action, Priority priority) { + public void trigger(O mutable, Action action, Priority priority) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index fb50a27b..20a1d6e3 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -21,7 +21,6 @@ package org.modelingvalue.dclare; import static org.modelingvalue.dclare.CoreSetableModifier.symmetricOpposite; -import static org.modelingvalue.dclare.Priority.one; import java.util.function.BiFunction; import java.util.function.Consumer; @@ -204,6 +203,10 @@ public boolean containment() { return opposite != null ? opposite.get() : null; } + public boolean hasOpposite() { + return opposite != null; + } + @Override public Setable> scope() { return scope != null ? scope.get() : null; @@ -227,18 +230,17 @@ Setable. diff(preValue, postValue, added -> { MOVING.run(true, () -> prePair.b().remove(prePair.a(), added)); } Mutable.D_PARENT_CONTAINING.set(added, Pair.of((Mutable) object, (Setable) this)); - if (push) { - if (prePair == null) { - added.dActivate(); - } else { - tx.set((Mutable) object, tx.state().children(one), Set::add, added); + if (prePair == null) { + tx.dActivate(added); + } + for (Priority prio : Priority.ALL) { + if ((prePair != null && prio == Priority.one) || !tx.current(added, tx.state().children(prio)).isEmpty() || !tx.current(added, tx.state().actions(prio)).isEmpty()) { + tx.set((Mutable) object, tx.state().children(prio), Set::add, added); } } }, removed -> { - if (push) { - for (Priority prio : Priority.ALL) { - tx.set((Mutable) object, tx.state().children(prio), Set::remove, removed); - } + for (Priority prio : Priority.ALL) { + tx.set((Mutable) object, tx.state().children(prio), Set::remove, removed); } if (!MOVING.get()) { Mutable.D_PARENT_CONTAINING.setDefault(removed); diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index 06bb3399..c6571be4 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -24,11 +24,9 @@ public interface Universe extends Mutable, Internable { default void init() { - UniverseTransaction universeTransaction = LeafTransaction.getCurrent().universeTransaction(); - universeTransaction.setInitialized(); - if (universeTransaction.push()) { - dActivate(); - } + LeafTransaction tx = LeafTransaction.getCurrent(); + tx.universeTransaction().setInitialized(); + tx.dActivate(this); } default void exit() { @@ -39,11 +37,4 @@ default void exit() { default boolean dIsOrphan(State state) { return false; } - - @Override - public default boolean pull() { - for (boolean incomplete = Mutable.super.pull(); incomplete; incomplete = Mutable.super.pull()) { - } - return false; - } } diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 2b2beded..24a81363 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -83,7 +83,8 @@ public class UniverseTransaction extends MutableTransaction { protected final AtomicReference> errors = new AtomicReference<>(Set.of()); private final AtomicReference> inconsistencies = new AtomicReference<>(Set.of()); private final AtomicReference orphansDetected = new AtomicReference<>(null); - private final ConstantState constantState = new ConstantState("CONST", this::handleException); + private final ConstantState constantState; + private final ConstantState pullConstantState; private final StatusProvider statusProvider; private final Timer timer = new Timer("UniverseTransactionTimer", true); private final MutableStates preStartStates; @@ -164,15 +165,17 @@ public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig con } public UniverseTransaction(Universe universe, ContextPool pool, DclareConfig config, Consumer startStatusConsumer) { - this(universe, pool, false, config, startStatusConsumer, null); + this(universe, pool, false, config, startStatusConsumer, null, null); } - public UniverseTransaction(Universe universe, ContextPool pool, boolean pull, DclareConfig config, Consumer startStatusConsumer, StateMap startStateMap) { + public UniverseTransaction(Universe universe, ContextPool pool, boolean pull, DclareConfig config, Consumer startStatusConsumer, StateMap startStateMap, ConstantState startConstantState) { super(null); - this.pull = pull; if (universe == null) { throw new IllegalArgumentException("UniverseTransaction can not start without a Universe (universe argument is null)"); } + this.pull = pull; + this.constantState = startConstantState != null ? startConstantState : new ConstantState("CONST", this::handleException); + this.pullConstantState = pull ? new ConstantState("PULL", this::handleException) : null; State initState = createStartState(universe, startStateMap); startState = initState.get(() -> incrementChangeId(universe, initState)); Status startStatus = new Status(Mood.starting, null, startState, null, Set.of()); @@ -273,7 +276,7 @@ public void run() { } runActions(preActions); runAction(action); - if (initialized) { + if (initialized && push()) { runAction(checkConsistency); } handleTooManyChanges(state); @@ -628,7 +631,7 @@ protected void clearOrphans(Universe universe) { return o instanceof Mutable && ((Mutable) o).dIsOrphan(postState) && !tx.toBeCleared((Mutable) o).isEmpty(); }).map(e -> (Mutable) e.getKey()).asSet(); orphansDetected.set(!orphans.isEmpty()); - orphans.forEach(tx::clearOrphan); + orphans.forEach(tx::dDeactivate); } public boolean isStopped(State state) { @@ -831,6 +834,10 @@ public ConstantState constantState() { return constantState; } + public ConstantState pullConstantState() { + return pullConstantState; + } + public TransactionId setPreserved(O object, Setable property, T post, Action action) { TransactionId txid = startState(Priority.OUTER).transactionId(); for (int i = 0; i < startStates.length() - 1; i++) { From bf5e0856b5f53710638e6e41bc0fb50d6522aac1 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 13 Mar 2024 09:05:01 +0100 Subject: [PATCH 035/179] rename --- .../dclare/AbstractDerivationTransaction.java | 4 +- .../dclare/ActionTransaction.java | 56 +++++++++---------- .../modelingvalue/dclare/ConstantState.java | 28 +++++----- ...angeHandler.java => ILeafTransaction.java} | 2 +- .../modelingvalue/dclare/LeafTransaction.java | 2 +- .../java/org/modelingvalue/dclare/State.java | 2 +- 6 files changed, 47 insertions(+), 47 deletions(-) rename src/main/java/org/modelingvalue/dclare/{ConstantChangeHandler.java => ILeafTransaction.java} (98%) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 6057ea1e..e707aa04 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -52,9 +52,9 @@ protected AbstractDerivationTransaction(UniverseTransaction universeTransaction) } private ConstantState memoization; - private ConstantChangeHandler changeHandler; + private ILeafTransaction changeHandler; - public R derive(Supplier action, State state, ConstantState memoization, ConstantChangeHandler changeHandler) { + public R derive(Supplier action, State state, ConstantState memoization, ILeafTransaction changeHandler) { this.memoization = memoization; this.changeHandler = changeHandler; try { diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index d9621a65..9343356c 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -39,36 +39,36 @@ import org.modelingvalue.dclare.ex.TransactionException; public class ActionTransaction extends LeafTransaction implements StateMergeHandler { - private final CurrentState currentState = new CurrentState(); - private final ConstantChangeHandler changeHandler = new ConstantChangeHandler() { - @Override - public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { - ActionTransaction.this.set(object, setable, preValue, postValue); - } - - @Override - public State state() { - return ActionTransaction.this.state(); - } - - @Override - public T set(O object, Setable property, T post) { - return ActionTransaction.this.set(object, property, post); - } - - @Override - public void trigger(O mutable, Action action, Priority priority) { - ActionTransaction.this.trigger(mutable, action, priority); - } - }; + private final CurrentState currentState = new CurrentState(); + private final ILeafTransaction changeHandler = new ILeafTransaction() { + @Override + public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { + ActionTransaction.this.set(object, setable, preValue, postValue); + } + + @Override + public State state() { + return ActionTransaction.this.state(); + } + + @Override + public T set(O object, Setable property, T post) { + return ActionTransaction.this.set(object, property, post); + } + + @Override + public void trigger(O mutable, Action action, Priority priority) { + ActionTransaction.this.trigger(mutable, action, priority); + } + }; @SuppressWarnings("unchecked") - private final Supplier supplier = () -> { - ((Action) action()).run(mutable()); - return null; - }; + private final Supplier supplier = () -> { + ((Action) action()).run(mutable()); + return null; + }; - private State preState; - private State postState; + private State preState; + private State postState; protected ActionTransaction(UniverseTransaction universeTransaction) { super(universeTransaction); diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index c40432f6..5f888f4d 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -156,7 +156,7 @@ public O object() { } @SuppressWarnings("unchecked") - public V get(ConstantChangeHandler cch, O object, Constant constant, Function deriver) { + public V get(ILeafTransaction cch, O object, Constant constant, Function deriver) { Map, Object> prev = constants; V ist = (V) prev.get(constant); if (ist == null) { @@ -171,7 +171,7 @@ public boolean isSet(Constant constant) { } @SuppressWarnings("unchecked") - public V getOrSet(ConstantChangeHandler cch, O object, Constant constant, V soll) { + public V getOrSet(ILeafTransaction cch, O object, Constant constant, V soll) { Map, Object> prev = constants; V ist = (V) prev.get(constant); if (ist == null) { @@ -181,7 +181,7 @@ public V getOrSet(ConstantChangeHandler cch, O object, Constant consta } @SuppressWarnings("unchecked") - public V set(ConstantChangeHandler cch, O object, Constant constant, V soll, boolean forced) { + public V set(ILeafTransaction cch, O object, Constant constant, V soll, boolean forced) { Map, Object> prev = constants; V ist = (V) prev.get(constant); if (ist == null || forced) { @@ -194,7 +194,7 @@ public V set(ConstantChangeHandler cch, O object, Constant constant, V } @SuppressWarnings("unchecked") - public V set(ConstantChangeHandler cch, O object, Constant constant, BiFunction function, E element) { + public V set(ILeafTransaction cch, O object, Constant constant, BiFunction function, E element) { Map, Object> prev = constants; V ist = (V) prev.get(constant); V soll = function.apply(ist, element); @@ -224,7 +224,7 @@ public String toString() { } @SuppressWarnings("unchecked") - private V set(ConstantChangeHandler cch, O object, Constant constant, Map, Object> prev, V soll, boolean forced) { + private V set(ILeafTransaction cch, O object, Constant constant, Map, Object> prev, V soll, boolean forced) { V ist; Map, Object> next = prev.put(constant, soll); while (!UPDATOR.compareAndSet(this, prev, next)) { @@ -243,7 +243,7 @@ private V set(ConstantChangeHandler cch, O object, Constant constant, } @SuppressWarnings({"unchecked", "resource"}) - private V derive(ConstantChangeHandler cch, O object, Constant constant, Function deriver) { + private V derive(ILeafTransaction cch, O object, Constant constant, Function deriver) { List> list = List.of(); while (true) { try { @@ -304,31 +304,31 @@ public void stop() { remover.interrupt(); } - public V get(ConstantChangeHandler cch, O object, Constant constant) { + public V get(ILeafTransaction cch, O object, Constant constant) { return getConstants(cch, object, referenceType(constant)).get(cch, object, constant, constant.deriver()); } - public O object(ConstantChangeHandler cch, O object) { + public O object(ILeafTransaction cch, O object) { return getConstants(cch, object, ReferenceType.weak).object(); } - public V get(ConstantChangeHandler cch, O object, Constant constant, Function deriver) { + public V get(ILeafTransaction cch, O object, Constant constant, Function deriver) { return getConstants(cch, object, referenceType(constant)).get(cch, object, constant, deriver); } - public boolean isSet(ConstantChangeHandler cch, O object, Constant constant) { + public boolean isSet(ILeafTransaction cch, O object, Constant constant) { return getConstants(cch, object, referenceType(constant)).isSet(constant); } - public V getOrSet(ConstantChangeHandler cch, O object, Constant constant, V value) { + public V getOrSet(ILeafTransaction cch, O object, Constant constant, V value) { return getConstants(cch, object, referenceType(constant)).getOrSet(cch, object, constant, value); } - public V set(ConstantChangeHandler cch, O object, Constant constant, V value, boolean forced) { + public V set(ILeafTransaction cch, O object, Constant constant, V value, boolean forced) { return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, value, forced); } - public V set(ConstantChangeHandler cch, O object, Constant constant, BiFunction deriver, E element) { + public V set(ILeafTransaction cch, O object, Constant constant, BiFunction deriver, E element) { return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, deriver, element); } @@ -337,7 +337,7 @@ private ReferenceType referenceType(Constant constant) { } @SuppressWarnings("unchecked") - private Constants getConstants(ConstantChangeHandler cch, O object, ReferenceType referenceType) { + private Constants getConstants(ILeafTransaction cch, O object, ReferenceType referenceType) { QualifiedSet prev = state.get(); Constants constants = prev.get(object); if (constants == null) { diff --git a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java b/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java similarity index 98% rename from src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java rename to src/main/java/org/modelingvalue/dclare/ILeafTransaction.java index 9ce888dc..afe7dee4 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantChangeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java @@ -20,7 +20,7 @@ package org.modelingvalue.dclare; -public interface ConstantChangeHandler { +public interface ILeafTransaction { void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue); diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index 90ffd42c..b296b185 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -36,7 +36,7 @@ import org.modelingvalue.collections.util.Context; @SuppressWarnings("unused") -public abstract class LeafTransaction extends Transaction implements ConstantChangeHandler { +public abstract class LeafTransaction extends Transaction implements ILeafTransaction { private static final Context CURRENT = Context.of(); diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index b3342492..475a46f6 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -272,7 +272,7 @@ public R derive(Supplier supplier, ConstantState constantState) { } } - public R derive(Supplier supplier, ConstantState constantState, ConstantChangeHandler changeHandler) { + public R derive(Supplier supplier, ConstantState constantState, ILeafTransaction changeHandler) { DerivationTransaction tx = universeTransaction.derivation.openTransaction(universeTransaction); try { return tx.derive(supplier, this, constantState, changeHandler); From b6922cd6bd439c8c24496b9b0bb3d9ff58642e12 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 13 Mar 2024 09:05:08 +0100 Subject: [PATCH 036/179] rename --- .../dclare/AbstractDerivationTransaction.java | 32 +++++++++---------- .../java/org/modelingvalue/dclare/State.java | 4 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index e707aa04..29ccc3b9 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -51,12 +51,12 @@ protected AbstractDerivationTransaction(UniverseTransaction universeTransaction) super(universeTransaction); } - private ConstantState memoization; - private ILeafTransaction changeHandler; + private ConstantState memoization; + private ILeafTransaction iLeafTransaction; - public R derive(Supplier action, State state, ConstantState memoization, ILeafTransaction changeHandler) { + public R derive(Supplier action, State state, ConstantState memoization, ILeafTransaction iLeafTransaction) { this.memoization = memoization; - this.changeHandler = changeHandler; + this.iLeafTransaction = iLeafTransaction; try { return get(action, state); } catch (Throwable t) { @@ -64,7 +64,7 @@ public R derive(Supplier action, State state, ConstantState memoization, return null; } finally { this.memoization = null; - this.changeHandler = null; + this.iLeafTransaction = null; } } @@ -104,7 +104,7 @@ private T derive(O object, Getable getable, T nonDerived) { Constant constant = observed.constant(); if (isDerived && outerDerivedValue.isSet()) { return outerDerivedValue.get(); - } else if (!mem.isSet(changeHandler, object, constant)) { + } else if (!mem.isSet(iLeafTransaction, object, constant)) { if (Newable.D_ALL_DERIVATIONS.equals(observed) || Mutable.D_PARENT_CONTAINING.equals(observed)) { return nonDerived; } else { @@ -130,7 +130,7 @@ private T derive(O object, Getable getable, T nonDerived) { setInMemoization(mem, object, observed, innerDerivedValue.get(), false); } }))); - if (!mem.isSet(changeHandler, object, constant)) { + if (!mem.isSet(iLeafTransaction, object, constant)) { if (isTraceDerivation(object, observed)) { INDENT.run(INDENT.get() + 1, () -> runNonDeriving(() -> System.err.println(tracePre(object) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); } @@ -139,7 +139,7 @@ private T derive(O object, Getable getable, T nonDerived) { } } } - return mem.get(changeHandler, object, constant); + return mem.get(iLeafTransaction, object, constant); } else { return nonDerived; } @@ -193,7 +193,7 @@ private T set(O object, Setable setable, T post, T nonDerived) { boolean isDerived = derivedValue != null && derivedValue.isDerived(object, observed); ConstantState mem = memoization(object); Constant constant = observed.constant(); - T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(changeHandler, object, constant) ? mem.get(changeHandler, object, constant) : nonDerived; + T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(iLeafTransaction, object, constant) ? mem.get(iLeafTransaction, object, constant) : nonDerived; T result = match(mem, observed, pre, post); if (isDerived) { derivedValue.set(result); @@ -214,7 +214,7 @@ Setable. diff(pre, result, added -> { } return pre; } else if (!Objects.equals(nonDerived, post)) { - return changeHandler == this ? super.set(object, setable, post) : changeHandler.set(object, setable, post); + return iLeafTransaction == this ? super.set(object, setable, post) : iLeafTransaction.set(object, setable, post); } else { return post; } @@ -227,21 +227,21 @@ private T match(ConstantState mem, Setable setable, T pre, T post) if (!pres.isEmpty()) { for (Newable po : posts) { Construction poInit = Mutable.D_INITIAL_CONSTRUCTION.get(po); - if (poInit.isDerived() && mem.isSet(changeHandler, po, Newable.D_ALL_DERIVATIONS.constant())) { + if (poInit.isDerived() && mem.isSet(iLeafTransaction, po, Newable.D_ALL_DERIVATIONS.constant())) { for (Newable pr : pres) { Construction preInit = Mutable.D_INITIAL_CONSTRUCTION.get(pr); if (preInit.isDirect() && po.dNewableType().equals(pr.dNewableType()) && Objects.equals(po.dIdentity(), pr.dIdentity())) { pres = pres.remove(pr); post = replace(post, po, pr); - setInMemoization(mem, pr, Mutable.D_ALL_DERIVATIONS, mem.get(changeHandler, po, Newable.D_ALL_DERIVATIONS.constant()), true); + setInMemoization(mem, pr, Mutable.D_ALL_DERIVATIONS, mem.get(iLeafTransaction, po, Newable.D_ALL_DERIVATIONS.constant()), true); } } } else if (poInit.isDirect()) { for (Newable pr : pres) { Construction preInit = Mutable.D_INITIAL_CONSTRUCTION.get(pr); - if (preInit.isDerived() && mem.isSet(changeHandler, pr, Newable.D_ALL_DERIVATIONS.constant()) && po.dNewableType().equals(pr.dNewableType()) && Objects.equals(po.dIdentity(), pr.dIdentity())) { + if (preInit.isDerived() && mem.isSet(iLeafTransaction, pr, Newable.D_ALL_DERIVATIONS.constant()) && po.dNewableType().equals(pr.dNewableType()) && Objects.equals(po.dIdentity(), pr.dIdentity())) { pres = pres.remove(pr); - setInMemoization(mem, po, Mutable.D_ALL_DERIVATIONS, mem.get(changeHandler, pr, Newable.D_ALL_DERIVATIONS.constant()), true); + setInMemoization(mem, po, Mutable.D_ALL_DERIVATIONS, mem.get(iLeafTransaction, pr, Newable.D_ALL_DERIVATIONS.constant()), true); } } } @@ -263,7 +263,7 @@ private T replace(T post, Newable po, Newable pr) { @Override public void trigger(O mutable, Action action, Priority priority) { - changeHandler.trigger(mutable, action, priority); + iLeafTransaction.trigger(mutable, action, priority); } @Override @@ -283,7 +283,7 @@ public O construct(Reason reason, Supplier supplier) { } protected T setInMemoization(ConstantState mem, O object, Setable setable, T result, boolean force) { - return force ? mem.set(changeHandler, object, setable.constant(), result, force) : mem.getOrSet(changeHandler, object, setable.constant(), result); + return force ? mem.set(iLeafTransaction, object, setable.constant(), result, force) : mem.getOrSet(iLeafTransaction, object, setable.constant(), result); } protected ConstantState memoization(O object) { diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index 475a46f6..edf79c27 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -272,10 +272,10 @@ public R derive(Supplier supplier, ConstantState constantState) { } } - public R derive(Supplier supplier, ConstantState constantState, ILeafTransaction changeHandler) { + public R derive(Supplier supplier, ConstantState constantState, ILeafTransaction iLeafTransaction) { DerivationTransaction tx = universeTransaction.derivation.openTransaction(universeTransaction); try { - return tx.derive(supplier, this, constantState, changeHandler); + return tx.derive(supplier, this, constantState, iLeafTransaction); } finally { universeTransaction.derivation.closeTransaction(tx); } From 6024e00895740297973d08252874bd2328c6f699 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Mar 2024 12:08:28 +0100 Subject: [PATCH 037/179] render json from state in readonly transaction on that state --- .../org/modelingvalue/dclare/StateToJson.java | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index 294a9096..ba49fb7b 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -20,6 +20,13 @@ package org.modelingvalue.dclare; +import java.util.AbstractMap.SimpleEntry; +import java.util.Comparator; +import java.util.Iterator; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.function.Predicate; + import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.List; import org.modelingvalue.collections.QualifiedSet; @@ -28,18 +35,11 @@ import org.modelingvalue.dclare.sync.Util; import org.modelingvalue.json.ToJson; -import java.util.AbstractMap.SimpleEntry; -import java.util.Comparator; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.function.Predicate; - @SuppressWarnings({"rawtypes", "unused"}) public class StateToJson extends ToJson { - public static final String ID_FIELD_NAME = "@id"; - public static final String ID_REF_FIELD_NAME = "@idref"; - public static final String NAME_FIELD_NAME = "name"; + public static final String ID_FIELD_NAME = "@id"; + public static final String ID_REF_FIELD_NAME = "@idref"; + public static final String NAME_FIELD_NAME = "name"; private static final Comparator> FIELD_SORTER = ((Comparator>) (e1, e2) -> isNameOrId(e1) ? -1 : isNameOrId(e2) ? +1 : 0).thenComparing(e -> e.getKey().toString()); private static boolean isNameOrId(Entry e) { @@ -62,6 +62,11 @@ public State getState() { return state; } + @Override + public String render() { + return state.get(super::render); + } + public boolean renderIdFor(Mutable mutable) { return true; } @@ -87,11 +92,11 @@ protected Iterator> getMapIterator(Object o) { List> entries; if (o instanceof Mutable mutable) { Collection> stream = mutable.dClass().dSetables() // - .filter(getSetableFilter()) // - .map(setable -> Pair.of(setable, state.get(mutable, (Setable) setable))) // - .filter(pair -> !Objects.equals(pair.b(), ((Setable) pair.a()).getDefault(mutable))) // - .map(pair -> (Entry) new SimpleEntry<>((Object) renderTag(pair.a()), renderValue(o, pair.a(), pair.b()))) // - .sorted(FIELD_SORTER); + .filter(getSetableFilter()) // + .map(setable -> Pair.of(setable, state.get(mutable, (Setable) setable))) // + .filter(pair -> !Objects.equals(pair.b(), ((Setable) pair.a()).getDefault(mutable))) // + .map(pair -> (Entry) new SimpleEntry<>((Object) renderTag(pair.a()), renderValue(o, pair.a(), pair.b()))) // + .sorted(FIELD_SORTER); if (renderIdFor(mutable)) { Collection> idEntry = Collection.of(new SimpleEntry<>(ID_FIELD_NAME, getId(mutable))); stream = Collection.concat(idEntry, stream); @@ -100,9 +105,9 @@ protected Iterator> getMapIterator(Object o) { } else if (o instanceof QualifiedSet) { QualifiedSet q = (QualifiedSet) o; entries = q.toKeys() // - .map(k -> (Entry) new SimpleEntry<>(k, q.get(k))) // - .sortedBy(e -> e.getKey().toString()) // - .asList(); + .map(k -> (Entry) new SimpleEntry<>(k, q.get(k))) // + .sortedBy(e -> e.getKey().toString()) // + .asList(); } else { throw new RuntimeException("this should not be reachable"); } From 1acfdf5a47b187b4000954fd02679c9a790d6887 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 29 Mar 2024 15:57:42 +0100 Subject: [PATCH 038/179] opposite fix when pulling --- .../dclare/AbstractDerivationTransaction.java | 20 +++++++++++------ .../dclare/ActionTransaction.java | 12 +++++++--- .../modelingvalue/dclare/LeafTransaction.java | 4 ++-- .../dclare/ObserverTransaction.java | 22 +++++++++---------- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 29ccc3b9..1469f5e6 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -113,12 +113,12 @@ private T derive(O object, Getable getable, T nonDerived) { Set> newDerived = oldDerived.add(derived); if (oldDerived == newDerived) { if (isTraceDerivation(object, observed)) { - runNonDeriving(() -> System.err.println(tracePre(object) + "RECU " + object + "." + observed + " => RECURSIVE DERIVATION, result is the non-derived value: " + nonDerived)); + runSilent(() -> System.err.println(tracePre(object) + "RECU " + object + "." + observed + " => RECURSIVE DERIVATION, result is the non-derived value: " + nonDerived)); } return nonDerived; } else { if (isTraceDerivation(object, observed)) { - runNonDeriving(() -> System.err.println(tracePre(object) + ">>>> " + object + "." + observed)); + runSilent(() -> System.err.println(tracePre(object) + ">>>> " + object + "." + observed)); } DerivedValue innerDerivedValue = new DerivedValue(object, observed); INDENT.run(INDENT.get() + 1, () -> DERIVED.run(newDerived, () -> DERIVED_VALUE.run(innerDerivedValue, () -> { @@ -132,7 +132,7 @@ private T derive(O object, Getable getable, T nonDerived) { }))); if (!mem.isSet(iLeafTransaction, object, constant)) { if (isTraceDerivation(object, observed)) { - INDENT.run(INDENT.get() + 1, () -> runNonDeriving(() -> System.err.println(tracePre(object) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); + INDENT.run(INDENT.get() + 1, () -> runSilent(() -> System.err.println(tracePre(object) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); } return nonDerived; } @@ -148,14 +148,14 @@ private T derive(O object, Getable getable, T nonDerived) { @SuppressWarnings({"rawtypes", "unchecked"}) protected void runDeriver(Mutable mutable, Observed observed, Observer observer, int i) { if (isTraceDerivation(mutable, observed)) { - runNonDeriving(() -> System.err.println(tracePre(mutable) + String.format(">>%d> ", i) + mutable + "." + observer + "()")); + runSilent(() -> System.err.println(tracePre(mutable) + String.format(">>%d> ", i) + mutable + "." + observer + "()")); } INDENT.run(INDENT.get() + 1, () -> DERIVER.run(Pair.of(mutable, observer), () -> { try { observer.run(mutable); } catch (Throwable t) { if (isTraceDerivation(mutable, observed)) { - runNonDeriving(() -> System.err.println(tracePre(mutable) + "!!!! " + mutable + "." + observer + "() => THROWS " + t)); + runSilent(() -> System.err.println(tracePre(mutable) + "!!!! " + mutable + "." + observer + "() => THROWS " + t)); } universeTransaction().handleException(new TransactionException(mutable, new TransactionException(observer, t))); } @@ -181,10 +181,16 @@ public T set(O object, Setable setable, T post) { return set(object, setable, post, nonDerived); } - public void runNonDeriving(Runnable action) { + @Override + public void runSilent(Runnable action) { DERIVE.run(false, action); } + @Override + public R getSilent(Supplier action) { + return DERIVE.get(false, action); + } + @SuppressWarnings({"unchecked", "rawtypes"}) private T set(O object, Setable setable, T post, T nonDerived) { if (doDeriveSet(object, setable, nonDerived)) { @@ -201,7 +207,7 @@ private T set(O object, Setable setable, T post, T nonDerived) { setInMemoization(mem, object, observed, result, false); } if (isTraceDerivation(object, observed)) { - runNonDeriving(() -> { + runSilent(() -> { Pair deriver = DERIVER.get(); System.err.println(tracePre(object) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); }); diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 9343356c..473a8dc3 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -41,9 +41,14 @@ public class ActionTransaction extends LeafTransaction implements StateMergeHandler { private final CurrentState currentState = new CurrentState(); private final ILeafTransaction changeHandler = new ILeafTransaction() { + @SuppressWarnings("unchecked") @Override public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { - ActionTransaction.this.set(object, setable, preValue, postValue); + ActionTransaction.this.changed(object, setable, preValue, rawPreValue, postValue); + if (setable.id() instanceof Observed) { + // LeafTransaction.getCurrent().runSilent(() -> System.err.println("PULL " + object + "." + setable + "=" + postValue)); + ActionTransaction.this.set(object, (Observed) setable.id(), preValue, postValue); + } } @Override @@ -53,6 +58,7 @@ public State state() { @Override public T set(O object, Setable property, T post) { + // LeafTransaction.getCurrent().runSilent(() -> System.err.println("PUSH " + object + "." + property + "=" + post)); return ActionTransaction.this.set(object, property, post); } @@ -100,7 +106,7 @@ protected final State run(State pre) { postState = currentState.merge(); Map>> diff = preState.diff(postState, o -> o instanceof Mutable, s -> s instanceof Observed && !s.isPlumbing()).asMap(e -> e); if (!diff.isEmpty()) { - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (" + postState.shortDiffString(diff, mutable()) + ")")); + runSilent(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (" + postState.shortDiffString(diff, mutable()) + ")")); } } else { postState = currentState.result(); @@ -217,7 +223,7 @@ private void trigger(O object, Observed observed) { Priority priority = observer.fixpointGroup() == fixpointGroup() ? observer.initPriority() : Priority.five; trigger(target, observer, priority); if (universeTransaction().getConfig().isTraceMutable()) { - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (TRIGGER " + target + "." + observer + ")")); + runSilent(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable() + "." + action() + " (TRIGGER " + target + "." + observer + ")")); } } } diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index b296b185..b7f79e17 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -175,11 +175,11 @@ protected Mutable dParent(Mutable object) { return state().getA(object, Mutable.D_PARENT_CONTAINING); } - public void runNonObserving(Runnable action) { + public void runSilent(Runnable action) { action.run(); } - public T getNonObserving(Supplier action) { + public T getSilent(Supplier action) { return action.get(); } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index f7e1a2e3..eab321cb 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -171,7 +171,7 @@ private void finish(State pre, Observer observer) { } if (throwable != null) { if (universeTransaction().getConfig().isTraceActions()) { - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable + "." + observer() + " (" + throwable.b() + ")")); + runSilent(() -> System.err.println(DclareTrace.getLineStart("DCLARE", this) + mutable + "." + observer() + " (" + throwable.b() + ")")); } if (throwable.b() instanceof NullPointerException && emptyMandatory.get().equals(TRUE)) { throwable = null; @@ -292,7 +292,7 @@ protected void set(O object, Setable setable, T pre, T post) { observe(object, (Observed) setable); if (!setable.isPlumbing() && !Objects.equals(pre, post)) { merge(); - result = getNonObserving(() -> { + result = getSilent(() -> { if (pre instanceof Newable || post instanceof Newable) { return (T) singleMatch((Mutable) object, (Observed) setable, pre, post); } else if (isCollection(pre) && isCollection(post) && (isNewableCollection(pre) || isNewableCollection(post))) { @@ -326,20 +326,20 @@ public void handleMergeConflict(Object object, Setable property, Object pre, Obj } @Override - public void runNonObserving(Runnable action) { + public void runSilent(Runnable action) { if (observeds.isInitialized()) { OBSERVE.run(false, action); } else { - super.runNonObserving(action); + super.runSilent(action); } } @Override - public T getNonObserving(Supplier action) { + public T getSilent(Supplier action) { if (observeds.isInitialized()) { return OBSERVE.get(false, action); } else { - return super.getNonObserving(action); + return super.getSilent(action); } } @@ -349,7 +349,7 @@ public void changed(O object, Setable setable, T preValue, T rawPre if (observing(object, setable)) { changed.set(TRUE); } - runNonObserving(() -> super.changed(object, setable, preValue, rawPreValue, postValue)); + runSilent(() -> super.changed(object, setable, preValue, rawPreValue, postValue)); } private boolean observing(O object, Getable setable) { @@ -568,7 +568,7 @@ private boolean isChangedBack(O object, Observed observed, T pre, T private void traceRippleOut(O object, Feature feature, Object post, Object result) { if (universeTransaction().getConfig().isTraceRippleOut()) { - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("DEFER", this) + mutable() + "." + observer() + // + runSilent(() -> System.err.println(DclareTrace.getLineStart("DEFER", this) + mutable() + "." + observer() + // " " + deferPriorityName() + " (" + object + "." + feature + "=" + result + "<-" + post + ")")); } } @@ -608,7 +608,7 @@ private Object singleMatch(Mutable object, Observed observed, Object before, Obj } } if (!found && universeTransaction().getConfig().isTraceMatching()) { - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable() + "." + observer() + " (" + preInfo + "!=" + postInfo + ")")); + runSilent(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable() + "." + observer() + " (" + preInfo + "!=" + postInfo + ")")); } } } @@ -665,7 +665,7 @@ private Object manyMatch(Mutable object, Observed observed, ContainingCollection break; } else if (universeTransaction().getConfig().isTraceMatching()) { MatchInfo finalPostInfo = postInfo; - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable() + "." + observer() + " (" + preInfo + "!=" + finalPostInfo + ")")); + runSilent(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable() + "." + observer() + " (" + preInfo + "!=" + finalPostInfo + ")")); } } } @@ -685,7 +685,7 @@ private void replace(MatchInfo replaced, MatchInfo replacing) { Mutable mutable = mutable(); Observer observer = observer(); if (universeTransaction().getConfig().isTraceMatching()) { - runNonObserving(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable + "." + observer + " (" + replacing + "==" + replaced + ")")); + runSilent(() -> System.err.println(DclareTrace.getLineStart("MATCH", this) + mutable + "." + observer + " (" + replacing + "==" + replaced + ")")); } if (Mutable.D_INITIAL_CONSTRUCTION.get(replacing.newable()).isDirect()) { super.set(replaced.newable(), Newable.D_REPLACING, Newable.D_REPLACING.getDefault(replaced.newable()), replacing.newable()); From 0faf467bac88d930f5cc8a474d782af107e464d4 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 1 Apr 2024 14:09:47 +0200 Subject: [PATCH 039/179] cycle warnings when pulling --- .../dclare/AbstractDerivationTransaction.java | 132 +++++++++++------- 1 file changed, 80 insertions(+), 52 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 1469f5e6..971a55f7 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -35,16 +35,16 @@ public abstract class AbstractDerivationTransaction extends ReadOnlyTransaction { @SuppressWarnings("rawtypes") - protected static final Context>> DERIVED = Context.of(Set.of()); + protected static final Context> ALL_DERIVED = Context.of(Set.of()); @SuppressWarnings("rawtypes") - protected static final Context> DERIVER = Context.of(null); + protected static final Context> DERIVER = Context.of(null); @SuppressWarnings("rawtypes") - private static final Context DERIVED_VALUE = Context.of(null); - private static final Context INDENT = Context.of(0); - private static final Context DERIVE = Context.of(true); + private static final Context DERIVED = Context.of(null); + private static final Context INDENT = Context.of(0); + private static final Context DERIVE = Context.of(true); public static boolean isDeriving() { - return !DERIVED.get().isEmpty(); + return !ALL_DERIVED.get().isEmpty(); } protected AbstractDerivationTransaction(UniverseTransaction universeTransaction) { @@ -98,48 +98,51 @@ protected T current(O object, Getable getable) { private T derive(O object, Getable getable, T nonDerived) { if (doDeriveGet(object, getable, nonDerived)) { Observed observed = (Observed) getable; - DerivedValue outerDerivedValue = DERIVED_VALUE.get(); - boolean isDerived = outerDerivedValue != null && outerDerivedValue.isDerived(object, observed); - ConstantState mem = memoization(object); - Constant constant = observed.constant(); - if (isDerived && outerDerivedValue.isSet()) { - return outerDerivedValue.get(); - } else if (!mem.isSet(iLeafTransaction, object, constant)) { - if (Newable.D_ALL_DERIVATIONS.equals(observed) || Mutable.D_PARENT_CONTAINING.equals(observed)) { - return nonDerived; - } else { - Pair derived = Pair.of((Mutable) object, observed); - Set> oldDerived = DERIVED.get(); - Set> newDerived = oldDerived.add(derived); - if (oldDerived == newDerived) { - if (isTraceDerivation(object, observed)) { - runSilent(() -> System.err.println(tracePre(object) + "RECU " + object + "." + observed + " => RECURSIVE DERIVATION, result is the non-derived value: " + nonDerived)); - } + Derived outerDerived = DERIVED.get(); + boolean isDerived = outerDerived != null && outerDerived.isDerived(object, observed); + if (isDerived && outerDerived.isSet()) { + return outerDerived.get(); + } else { + ConstantState mem = memoization(object); + Constant constant = observed.constant(); + if (!mem.isSet(iLeafTransaction, object, constant)) { + if (isDerived || Newable.D_ALL_DERIVATIONS.equals(observed) || Mutable.D_PARENT_CONTAINING.equals(observed)) { return nonDerived; } else { - if (isTraceDerivation(object, observed)) { - runSilent(() -> System.err.println(tracePre(object) + ">>>> " + object + "." + observed)); - } - DerivedValue innerDerivedValue = new DerivedValue(object, observed); - INDENT.run(INDENT.get() + 1, () -> DERIVED.run(newDerived, () -> DERIVED_VALUE.run(innerDerivedValue, () -> { - int i = 0; - for (Observer observer : ((Mutable) object).dAllDerivers(observed)) { - runDeriver((Mutable) object, observed, observer, ++i); + Derived innerDerived = new Derived(object, observed, outerDerived); + Set oldAllDerived = ALL_DERIVED.get(); + if (oldAllDerived.contains(innerDerived)) { + if (pull() && !observed.synthetic()) { + runSilent(() -> System.err.println(tracePre(object, null) + "CYCLE " + innerDerived)); } - if (innerDerivedValue.isSet()) { - setInMemoization(mem, object, observed, innerDerivedValue.get(), false); - } - }))); - if (!mem.isSet(iLeafTransaction, object, constant)) { if (isTraceDerivation(object, observed)) { - INDENT.run(INDENT.get() + 1, () -> runSilent(() -> System.err.println(tracePre(object) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); + runSilent(() -> System.err.println(tracePre(object, this) + "RECU " + object + "." + observed + " => RECURSIVE DERIVATION, result is the non-derived value: " + nonDerived)); } return nonDerived; + } else { + if (isTraceDerivation(object, observed)) { + runSilent(() -> System.err.println(tracePre(object, this) + ">>>> " + object + "." + observed)); + } + INDENT.run(INDENT.get() + 1, () -> ALL_DERIVED.run(oldAllDerived.add(innerDerived), () -> DERIVED.run(innerDerived, () -> { + int i = 0; + for (Observer observer : ((Mutable) object).dAllDerivers(observed)) { + runDeriver((Mutable) object, observed, observer, ++i); + } + if (innerDerived.isSet()) { + setInMemoization(mem, object, observed, innerDerived.get(), false); + } + }))); + if (!mem.isSet(iLeafTransaction, object, constant)) { + if (isTraceDerivation(object, observed)) { + INDENT.run(INDENT.get() + 1, () -> runSilent(() -> System.err.println(tracePre(object, this) + "NODR " + object + "." + observed + " => NO DERIVATION, result is the non-derived value: " + nonDerived))); + } + return nonDerived; + } } } } + return mem.get(iLeafTransaction, object, constant); } - return mem.get(iLeafTransaction, object, constant); } else { return nonDerived; } @@ -148,14 +151,14 @@ private T derive(O object, Getable getable, T nonDerived) { @SuppressWarnings({"rawtypes", "unchecked"}) protected void runDeriver(Mutable mutable, Observed observed, Observer observer, int i) { if (isTraceDerivation(mutable, observed)) { - runSilent(() -> System.err.println(tracePre(mutable) + String.format(">>%d> ", i) + mutable + "." + observer + "()")); + runSilent(() -> System.err.println(tracePre(mutable, this) + String.format(">>%d> ", i) + mutable + "." + observer + "()")); } INDENT.run(INDENT.get() + 1, () -> DERIVER.run(Pair.of(mutable, observer), () -> { try { observer.run(mutable); } catch (Throwable t) { if (isTraceDerivation(mutable, observed)) { - runSilent(() -> System.err.println(tracePre(mutable) + "!!!! " + mutable + "." + observer + "() => THROWS " + t)); + runSilent(() -> System.err.println(tracePre(mutable, this) + "!!!! " + mutable + "." + observer + "() => THROWS " + t)); } universeTransaction().handleException(new TransactionException(mutable, new TransactionException(observer, t))); } @@ -195,21 +198,21 @@ public R getSilent(Supplier action) { private T set(O object, Setable setable, T post, T nonDerived) { if (doDeriveSet(object, setable, nonDerived)) { Observed observed = (Observed) setable; - DerivedValue derivedValue = DERIVED_VALUE.get(); - boolean isDerived = derivedValue != null && derivedValue.isDerived(object, observed); + Derived derived = DERIVED.get(); + boolean isDerived = derived != null && derived.isDerived(object, observed); ConstantState mem = memoization(object); Constant constant = observed.constant(); - T pre = isDerived && derivedValue.isSet() ? derivedValue.get() : mem.isSet(iLeafTransaction, object, constant) ? mem.get(iLeafTransaction, object, constant) : nonDerived; + T pre = isDerived && derived.isSet() ? derived.get() : mem.isSet(iLeafTransaction, object, constant) ? mem.get(iLeafTransaction, object, constant) : nonDerived; T result = match(mem, observed, pre, post); if (isDerived) { - derivedValue.set(result); + derived.set(result); } else { setInMemoization(mem, object, observed, result, false); } if (isTraceDerivation(object, observed)) { runSilent(() -> { Pair deriver = DERIVER.get(); - System.err.println(tracePre(object) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); + System.err.println(tracePre(object, this) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); }); } if (observed.containment()) { @@ -305,8 +308,8 @@ protected boolean isTraceDerivation(O object, Setable setable) { return (setable == null || !setable.isPlumbing()) && universeTransaction().getConfig().isTraceDerivation(); } - private String tracePre(O object) { - return DclareTrace.getLineStart(memoization(object).toString(), this); + private String tracePre(O object, Transaction transaction) { + return DclareTrace.getLineStart(memoization(object).toString(), transaction); } @Override @@ -314,13 +317,17 @@ public int depth() { return INDENT.get(); } - protected static class DerivedValue extends Pair> { - private static final long serialVersionUID = -2566539820227398813L; + protected static class Derived extends Pair> { + private static final long serialVersionUID = -2566539820227398813L; - private T value; + @SuppressWarnings("rawtypes") + private final Derived outer; + private T value; - protected DerivedValue(O a, Observed b) { + @SuppressWarnings("rawtypes") + protected Derived(O a, Observed b, Derived outer) { super(a, b); + this.outer = outer; } protected T get() { @@ -336,10 +343,31 @@ protected boolean isSet() { return value != null; } - protected boolean isDerived(O object, Observed observed) { + protected boolean isDerived(Object object, Observed observed) { return a().equals(object) && b().equals(observed); } + @SuppressWarnings("rawtypes") + protected Derived outer() { + return outer; + } + + @SuppressWarnings("rawtypes") + protected Derived outerNotSynthetic() { + return outer != null && outer.b().synthetic() ? outer.outerNotSynthetic() : outer; + } + + @Override + public String toString() { + return toString(this); + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + private String toString(Derived deepest) { + Derived ons = outerNotSynthetic(); + return (ons != null && !ons.isDerived(deepest.a(), deepest.b()) ? ons.toString(deepest) : "") + "[" + a() + "." + b() + "]"; + } + } } From 1a69fda3d6ffb6a868269ed8239b11e335dc309c Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 3 Apr 2024 12:47:27 +0200 Subject: [PATCH 040/179] nullpointer fix in derivation trace --- .../modelingvalue/dclare/AbstractDerivationTransaction.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 971a55f7..250b9f2c 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -212,7 +212,11 @@ private T set(O object, Setable setable, T post, T nonDerived) { if (isTraceDerivation(object, observed)) { runSilent(() -> { Pair deriver = DERIVER.get(); - System.err.println(tracePre(object, this) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); + if (deriver != null) { + System.err.println(tracePre(object, this) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); + } else { + System.err.println(tracePre(object, this) + "SET (" + object + "." + observed + "=" + pre + "->" + result + ")"); + } }); } if (observed.containment()) { From fec87cc0a87d819d06a42c60c048904e023e9391 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 3 Apr 2024 13:02:23 +0200 Subject: [PATCH 041/179] do not trace synthetic --- .../org/modelingvalue/dclare/AbstractDerivationTransaction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 250b9f2c..0f495a2d 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -309,7 +309,7 @@ public ConstantState memoization() { @SuppressWarnings("rawtypes") protected boolean isTraceDerivation(O object, Setable setable) { - return (setable == null || !setable.isPlumbing()) && universeTransaction().getConfig().isTraceDerivation(); + return (setable == null || (!setable.isPlumbing() && !setable.synthetic())) && universeTransaction().getConfig().isTraceDerivation(); } private String tracePre(O object, Transaction transaction) { From 63521c146ca82d1d29b6f3eebbfb2968222756a6 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Thu, 4 Apr 2024 16:07:40 +0200 Subject: [PATCH 042/179] update gradle from 7.6 to 8.7 --- gradle/wrapper/gradle-wrapper.jar | Bin 60756 -> 61574 bytes gradle/wrapper/gradle-wrapper.properties | 3 ++- gradlew | 12 ++++++++---- gradlew.bat | 1 + 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832f090a2944b7473328c07c9755baa3196..943f0cbfa754578e88a3dae77fce6e3dea56edbf 100644 GIT binary patch delta 36524 zcmZ6yQ*&aJ*i+pKn$=zKxk7ICNNX(G9gnUwow3iT2Ov?s|4Q$^qH|&1~>6K_f6Q@z)!W6o~05E1}7HS1}Bv=ef%?3Rc##Sb1)XzucCDxr#(Nfxotv ze%V_W`66|_=BK{+dN$WOZ#V$@kI(=7e7*Y3BMEum`h#%BJi{7P9=hz5ij2k_KbUm( zhz-iBt4RTzAPma)PhcHhjxYjxR6q^N4p+V6h&tZxbs!p4m8noJ?|i)9ATc@)IUzb~ zw2p)KDi7toTFgE%JA2d_9aWv7{xD{EzTGPb{V6+C=+O-u@I~*@9Q;(P9sE>h-v@&g ztSnY;?gI0q;XWPTrOm!4!5|uwJYJVPNluyu5}^SCc1ns-U#GrGqZ1B#qCcJbqoMAc zF$xB#F!(F?RcUqZtueR`*#i7DQ2CF?hhYV&goK!o`U?+H{F-15he}`xQ!)+H>0!QM z`)D&7s@{0}iVkz$(t{mqBKP?~W4b@KcuDglktFy&<2_z)F8Q~73;QcP`+pO=L}4yjlzNuLzuvnVAO``skBd=rV%VWQTd0x6_%ddY*G(AJt06`GHq zJV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ehLa)|+7#Zb0?o%D@T)w)Vm0KD{zrLi>YiGD?tplqwb^^?5^R zVQ^cR0OXiN=z=hi7TJuLFi2sdpeA8(lc@(S34_Zb8UWQ#grZQ0DFe2NZ9rT!i0zk! zwn=~iWf;)=cS6mQY*T(f2O?tGW*=4r$j+g`R~RjV6cDkW!pHy^3F1NffE2tc{%(%w zm(Y>*=>0|@ZDFM2IyNYEkQZzoB*3dO*7?XAjS|Aeqrm}OQTPSK!EEhdBwMI3qF%)T z`iN(P<_0(OvUNm(!Vm^BMgFiTn*z!Z8s^Y=qOh!OD>@{%cx%@^TZDAx?4|M410{SqTm#yXk zaz`+b=5}`aRS}nw5iBoT5F>pQ18p_@)vqMSmLEVitr{UQQs>C103t_s%W)9UbHqcy zz^Dz(!8^|pFEd3p00#ocNRWUdU^yy-mN6oPaYsxXkQvwF(gFL&y&zFP&x%v8 z2tZGupne~qFrm+d22K+yavbDi921x!@l`4^Z79|cbezQi6w3rkKKaX(1QZqt`Vs=} zvov82nkJ4U-Ju9x9${_LgxOpx$k8~DoS$tRAir=BIB5d^p>tTXMv((>^gNPf9hjRW zL5-KeK)MDvjhubYDOspG4Ma}4K=d2zWm$0{aynBxpr|aiYcstb{1^|PEdhwm5+T3ZU#=){oFze(jcj+Sc^#n7qTxTE3w{>*{h6KdY89A1M}#@vzJ3Fc VwlMN}`%er%aGR6olj~j${vQ;P=LY}) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 070cb702..20db9ad5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index a69d9cb6..65dcd68d 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac diff --git a/gradlew.bat b/gradlew.bat index f127cfd4..93e3f59f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% From 2276fe0964ee9a4950158a9bd252dbf6f5cbfbfb Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Mon, 3 Jun 2024 22:54:41 +0200 Subject: [PATCH 043/179] minor refactoring of StateToJson --- .../org/modelingvalue/dclare/StateToJson.java | 91 +++++++++++-------- 1 file changed, 53 insertions(+), 38 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index ba49fb7b..b9894234 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -20,26 +20,25 @@ package org.modelingvalue.dclare; -import java.util.AbstractMap.SimpleEntry; import java.util.Comparator; +import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.function.Predicate; -import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.List; import org.modelingvalue.collections.QualifiedSet; import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.util.Pair; import org.modelingvalue.dclare.sync.Util; import org.modelingvalue.json.ToJson; @SuppressWarnings({"rawtypes", "unused"}) public class StateToJson extends ToJson { - public static final String ID_FIELD_NAME = "@id"; - public static final String ID_REF_FIELD_NAME = "@idref"; - public static final String NAME_FIELD_NAME = "name"; + public static final String ID_FIELD_NAME = "@id"; + public static final String ID_REF_FIELD_NAME = "@idref"; + public static final String NAME_FIELD_NAME = "name"; private static final Comparator> FIELD_SORTER = ((Comparator>) (e1, e2) -> isNameOrId(e1) ? -1 : isNameOrId(e2) ? +1 : 0).thenComparing(e -> e.getKey().toString()); private static boolean isNameOrId(Entry e) { @@ -67,51 +66,68 @@ public String render() { return state.get(super::render); } - public boolean renderIdFor(Mutable mutable) { - return true; - } - @Override protected boolean isMapType(Object o) { - return o instanceof Mutable || o instanceof QualifiedSet; + return o instanceof Mutable || o instanceof QualifiedSet || o instanceof Map; } @SuppressWarnings("unchecked") @Override protected Iterator getArrayIterator(Object o) { - if (o instanceof Set) { - return (Iterator) ((Set) o).sorted(setSorter).asList().iterator(); + if (o instanceof Set) { + return (Iterator) ((Set) o).sorted(setSorter).asList().iterator(); } else { return super.getArrayIterator(o); } } - @SuppressWarnings("unchecked") @Override protected Iterator> getMapIterator(Object o) { - List> entries; + Map m; if (o instanceof Mutable mutable) { - Collection> stream = mutable.dClass().dSetables() // - .filter(getSetableFilter()) // - .map(setable -> Pair.of(setable, state.get(mutable, (Setable) setable))) // - .filter(pair -> !Objects.equals(pair.b(), ((Setable) pair.a()).getDefault(mutable))) // - .map(pair -> (Entry) new SimpleEntry<>((Object) renderTag(pair.a()), renderValue(o, pair.a(), pair.b()))) // - .sorted(FIELD_SORTER); - if (renderIdFor(mutable)) { - Collection> idEntry = Collection.of(new SimpleEntry<>(ID_FIELD_NAME, getId(mutable))); - stream = Collection.concat(idEntry, stream); - } - entries = stream.asList(); - } else if (o instanceof QualifiedSet) { - QualifiedSet q = (QualifiedSet) o; - entries = q.toKeys() // - .map(k -> (Entry) new SimpleEntry<>(k, q.get(k))) // - .sortedBy(e -> e.getKey().toString()) // - .asList(); + m = getMapIterator_Mutable(mutable); + } else if (o instanceof Map map) { + m = getMapIterator_Map(map); + } else if (o instanceof QualifiedSet qualifiedSet) { + m = getMapIterator_QualifiedSet(qualifiedSet); } else { throw new RuntimeException("this should not be reachable"); } - return entries.iterator(); + return m.entrySet().stream().sorted(FIELD_SORTER).iterator(); + } + + protected Map getMapIterator_Mutable(Mutable mutable) { + Predicate setableFilter = getSetableFilter(); + return mutable.dClass() + .dSetables() // + .map((Setable setable) -> { + if (!setableFilter.test(setable)) { + return null; + } + @SuppressWarnings("unchecked") + Object value = state.get(mutable, setable); + @SuppressWarnings("unchecked") + Object defValue = setable.getDefault(mutable); + if (Objects.equals(value, defValue)) { + return null; + } + return org.modelingvalue.collections.Entry.of((Object) renderTag(setable), renderValue(mutable, setable, value)); + }) // + .filter(Objects::nonNull) // + .asMap(e -> e) + .toMutable(); + } + + @SuppressWarnings("unchecked") + protected Map getMapIterator_QualifiedSet(QualifiedSet qualifiedSet) { + return qualifiedSet.toKeys() + .asMap(k -> org.modelingvalue.collections.Entry.of(k, qualifiedSet.get(k))) + .toMutable(); + } + + @SuppressWarnings("unchecked") + protected Map getMapIterator_Map(Map map) { + return map; } protected Predicate getSetableFilter() { @@ -150,10 +166,9 @@ protected Object renderReferenceValue(Object o, Setable setable, Object value) { return value; } - protected QualifiedSet makeRef(Mutable mutableValue) { - if (!renderIdFor(mutableValue)) { - throw new IllegalArgumentException("json serialisation can not proceed: need to " + ID_REF_FIELD_NAME + " to mutable " + getId(mutableValue) + " of class " + mutableValue.dClass() + " that does not render its " + ID_FIELD_NAME); - } - return QualifiedSet.of(__ -> ID_REF_FIELD_NAME, getId(mutableValue)); + protected Map makeRef(Mutable mutable) { + Map map = new HashMap<>(); + map.put(ID_REF_FIELD_NAME, getId(mutable)); + return map; } } From bc379a7039a01b7238c52844dafa5fd4eeb06899 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 13 Jun 2024 13:42:28 +0200 Subject: [PATCH 044/179] skip checks for NonCheckingObserver --- src/main/java/org/modelingvalue/dclare/LeafTransaction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index b7f79e17..4bb97445 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -54,7 +54,7 @@ public static int sizeForConsistency(DefaultMap> map) { @SuppressWarnings("rawtypes") private static boolean ignoreForConsistency(Object o) { - return o instanceof Observed && !((Observed) o).checkConsistency(); + return (o instanceof Observed && !((Observed) o).checkConsistency()) || o instanceof NonCheckingObserver; } public static String condenseForConsistencyTrace(DefaultMap> map) { From af8c1f5bb1ba0b48b9eedaa7a6d08a82d0ed0aa6 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 25 Jun 2024 16:15:31 +0200 Subject: [PATCH 045/179] slightly simplified ripple-out --- .../org/modelingvalue/dclare/Mutable.java | 3 +- .../dclare/NonCheckingObserver.java | 5 + .../org/modelingvalue/dclare/Observer.java | 4 + .../dclare/ObserverTransaction.java | 107 +++++++----------- .../dclare/test/NewableTests.java | 2 +- 5 files changed, 49 insertions(+), 72 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index f7d579af..096c0ed8 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -50,8 +50,7 @@ public interface Mutable extends TransactionClass { @SuppressWarnings({"rawtypes", "unchecked"}) Setable>> D_OBSERVERS = Setable.of("D_OBSERVERS", Set.of(), (tx, obj, pre, post) -> Setable.>, Observer> diff(pre, post, // added -> added.trigger(obj, added.fixpointGroup() == FixpointGroup.DEFAULT ? added.initPriority() : Priority.five), // - removed -> { - })); + removed -> removed.deObserve(tx, obj))); Observer D_OBSERVERS_RULE = NonCheckingObserver.of("D_OBSERVERS_RULE", m -> D_OBSERVERS.set(m, m.dAllObservers().exclude(o -> o.direction().isLazy()).asSet())); diff --git a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java index 2cf9a0d8..06f5b2cd 100644 --- a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java @@ -60,6 +60,11 @@ public NonCheckingObserver.NonCheckingTransaction newTransaction(UniverseTransac return new NonCheckingTransaction(universeTransaction); } + @Override + public boolean isActive(Mutable mutable) { + return !isStopped(); + } + public static class NonCheckingTransaction extends ObserverTransaction { protected NonCheckingTransaction(UniverseTransaction root) { diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index a745fe95..bee7fd0a 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -409,4 +409,8 @@ public Debugs debugs() { return debugs; } + public boolean isActive(Mutable mutable) { + return !isStopped() && Mutable.D_OBSERVERS.get(mutable).contains(this); + } + } diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index eab321cb..0e2be3a5 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -98,7 +98,7 @@ protected final void run(State pre, UniverseTransaction universeTransaction) { // check if the universe is still in the same transaction run, if not: reset the counts of my observer observer.startTransaction(universeTransaction.stats()); // check if we should do the work... - if (!observer.isStopped() && !universeTransaction.isKilled()) { + if (!universeTransaction.isKilled() && observer.isActive(mutable())) { observeds.init(Observed.OBSERVED_MAP); constructions.init(Map.of()); emptyMandatory.init(FALSE); @@ -159,10 +159,10 @@ private void finish(State pre, Observer observer) { } } trace(pre, observeds); - DefaultMap preSources = super.set(mutable, observer.observeds(), observeds); - if (preSources.isEmpty() && !observeds.isEmpty()) { + DefaultMap preObserveds = super.set(mutable, observer.observeds(), observeds); + if (preObserveds.isEmpty() && !observeds.isEmpty()) { observer.addInstance(); - } else if (!preSources.isEmpty() && observeds.isEmpty()) { + } else if (!preObserveds.isEmpty() && observeds.isEmpty()) { observer.removeInstance(); } } catch (ConsistencyError ce) { @@ -412,19 +412,17 @@ private Map actualize(Map map) { private T rippleOut(O object, Observed observed, T pre, T post) { boolean isColl = isNonMapCollection(pre) && isNonMapCollection(post); boolean isList = isColl && isList(pre) && isList(post); - boolean forward = isForward(object, observed, pre, post, isColl); - boolean isNew = !startState(Priority.four).get(mutable(), Mutable.D_OBSERVERS).contains(observer()); if (isColl) { ContainingCollection[] result = new ContainingCollection[]{(ContainingCollection) post}; Observed> many = (Observed>) observed; Setable. diff(pre, post, added -> { - Priority delay = added(object, many, added, forward, isNew); + Priority delay = added(object, many, added); if (delay != null) { defer.set(delay, TRUE); result[0] = result[0].remove(added); } }, removed -> { - Priority delay = removed(object, many, removed, forward, isNew); + Priority delay = removed(object, many, removed); if (delay != null) { defer.set(delay, TRUE); if (isList) { @@ -441,7 +439,7 @@ Setable. diff(pre, post, added -> { } } if (!isColl || isList) { - Priority delay = changed(object, observed, pre, post, forward, isNew); + Priority delay = changed(object, observed, pre, post); if (delay != null) { defer.set(delay, TRUE); traceRippleOut(object, observed, post, pre); @@ -459,72 +457,42 @@ private boolean isList(T t) { return t instanceof List; } - @SuppressWarnings({"rawtypes", "unchecked"}) - private boolean isForward(O outObject, Observed outObserved, T pre, T post, boolean isColl) { - Mutable mutable = mutable(); - Pair> intermediatePair = startState(Priority.INNER).get(mutable, Mutable.D_PARENT_CONTAINING); - if (!Objects.equals(preStartState(Priority.INNER).get(mutable, Mutable.D_PARENT_CONTAINING), intermediatePair) || !Objects.equals(intermediatePair, state().get(mutable, Mutable.D_PARENT_CONTAINING))) { - return true; - } else { - Boolean[] match = new Boolean[]{null}; - return observeds.get().anyMatch(e -> e.getValue().anyMatch(o -> { - Observed inObserved = e.getKey(); - if (!inObserved.isPlumbing()) { - Mutable inObject = o.dResolve(mutable); - if (!inObject.equals(outObject) || !inObserved.equals(outObserved)) { - Object intermediateObject = startState(Priority.INNER).get(inObject, inObserved); - return !Objects.equals(preStartState(Priority.INNER).get(inObject, inObserved), intermediateObject) || !Objects.equals(intermediateObject, state().get(inObject, inObserved)); - } else if (isColl) { - if (match[0] == null) { - match[0] = isChanged(outObject, outObserved, (ContainingCollection) pre, (ContainingCollection) post, preStartState(Priority.INNER), startState(Priority.INNER)) // - || isChanged(outObject, outObserved, (ContainingCollection) pre, (ContainingCollection) post, startState(Priority.INNER), state()); - } - return match[0]; - } - } - return false; - })); - } - } - - private boolean isChanged(O object, Observed many, ContainingCollection pre, ContainingCollection post, IState preState, IState postState) { - boolean[] result = new boolean[1]; - Setable. diff(preState.get(object, many), postState.get(object, many), added -> result[0] = pre.contains(added) == post.contains(added), removed -> result[0] = pre.contains(removed) == post.contains(removed)); - return result[0]; - } - - private , E> Priority added(O object, Observed observed, E added, boolean forward, boolean isNew) { - return added(object, observed, startState(Priority.INNER), state(), added, forward) ? Priority.INNER : // + private , E> Priority added(O object, Observed observed, E added) { + return added(object, observed, startState(Priority.INNER), state(), added) ? Priority.INNER : // becameDerived(observed, added, startState(Priority.three), current()) ? Priority.three : // - (isNew && added(object, observed, startState(), startState(Priority.four), added, forward)) ? Priority.four : // - added(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), added, forward) ? Priority.OUTER : null; + (isNew(startState(Priority.four), state()) && added(object, observed, startState(), startState(Priority.four), added)) ? Priority.four : // + added(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), added) ? Priority.OUTER : null; } - private , E> Priority removed(O object, Observed observed, E removed, boolean forward, boolean isNew) { - return removed(object, observed, startState(Priority.INNER), state(), removed, forward) ? Priority.INNER : // - (isNew && removed(object, observed, startState(), startState(Priority.four), removed, forward)) ? Priority.four : // + private , E> Priority removed(O object, Observed observed, E removed) { + return removed(object, observed, startState(Priority.INNER), state(), removed) ? Priority.INNER : // + (isNew(startState(Priority.four), state()) && removed(object, observed, startState(), startState(Priority.four), removed)) ? Priority.four : // becameContained(observed, removed, startState(Priority.four), startState(Priority.INNER)) ? Priority.four : // - removed(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), removed, forward) ? Priority.OUTER : null; + removed(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), removed) ? Priority.OUTER : null; } - private Priority changed(O object, Observed observed, T pre, T post, boolean forward, boolean isNew) { - return changed(object, observed, startState(Priority.INNER), state(), pre, post, forward) ? Priority.INNER : // + private Priority changed(O object, Observed observed, T pre, T post) { + return changed(object, observed, startState(Priority.INNER), state(), pre, post) ? Priority.INNER : // becameDerived(observed, post, startState(Priority.three), current()) ? Priority.three : // - (isNew && changed(object, observed, startState(), startState(Priority.four), pre, post, forward)) ? Priority.four : // + (isNew(startState(Priority.four), state()) && changed(object, observed, startState(), startState(Priority.four), pre, post)) ? Priority.four : // becameContained(observed, pre, startState(Priority.four), startState(Priority.INNER)) ? Priority.four : // - changed(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), pre, post, forward) ? Priority.OUTER : null; + changed(object, observed, preStartState(Priority.OUTER).raw(), startState(Priority.OUTER), pre, post) ? Priority.OUTER : null; + } + + private boolean isNew(IState preState, IState postState) { + return !preState.get(mutable(), Mutable.D_OBSERVERS).contains(observer()) && postState.get(mutable(), Mutable.D_OBSERVERS).contains(observer()); } - private , E> boolean added(O object, Observed observed, IState preState, IState postState, E added, boolean forward) { - return isChildChanged(observed, added, preState, postState) || isRemoved(object, observed, added, preState, postState, forward); + private , E> boolean added(O object, Observed observed, IState preState, IState postState, E added) { + return isChildChanged(observed, added, preState, postState) || isRemoved(object, observed, added, preState, postState); } - private , E> boolean removed(O object, Observed observed, IState preState, IState postState, E removed, boolean forward) { - return isChildChanged(observed, removed, preState, postState) || isAdded(object, observed, removed, preState, postState, forward); + private , E> boolean removed(O object, Observed observed, IState preState, IState postState, E removed) { + return isChildChanged(observed, removed, preState, postState) || isAdded(object, observed, removed, preState, postState); } - private boolean changed(O object, Observed observed, IState preState, IState postState, T pre, T post, boolean forward) { - return isChangedBack(object, observed, pre, post, preState, postState, forward) || // + private boolean changed(O object, Observed observed, IState preState, IState postState, T pre, T post) { + return isChangedBack(object, observed, pre, post, preState, postState) || // isChildChanged(observed, pre, preState, postState) || isChildChanged(observed, post, preState, postState); } @@ -550,20 +518,21 @@ private boolean isChildChanged(Observed observed, E element, ISt return false; } - private , E> boolean isAdded(O object, Observed observed, E element, IState preState, IState postState, boolean forward) { - return !observed.collection(preState.get(object, observed)).contains(element) && // - (!forward || postState == state() || observed.collection(postState.get(object, observed)).contains(element)); + private , E> boolean isAdded(O object, Observed observed, E removed, IState preState, IState postState) { + return !observed.collection(preState.get(object, observed)).contains(removed) && // + (postState == state() || observed.collection(postState.get(object, observed)).contains(removed)); } - private , E> boolean isRemoved(O object, Observed observed, E element, IState preState, IState postState, boolean forward) { - return observed.collection(preState.get(object, observed)).contains(element) && // - (!forward || postState == state() || !observed.collection(postState.get(object, observed)).contains(element)); + private , E> boolean isRemoved(O object, Observed observed, E added, IState preState, IState postState) { + return observed.collection(preState.get(object, observed)).contains(added) && // + (postState == state() || !observed.collection(postState.get(object, observed)).contains(added)); } @SuppressWarnings("unused") - private boolean isChangedBack(O object, Observed observed, T pre, T post, IState preState, IState postState, boolean forward) { + private boolean isChangedBack(O object, Observed observed, T pre, T post, IState preState, IState postState) { T before = preState.get(object, observed); - return Objects.equals(before, post) && (!forward || (postState != state() && !Objects.equals(before, postState.get(object, observed)))); + return Objects.equals(before, post) && // + (postState == state() || !Objects.equals(before, postState.get(object, observed))); } private void traceRippleOut(O object, Feature feature, Object post, Object result) { diff --git a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java index 5886bbe5..520f44b0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java @@ -431,7 +431,7 @@ private State oofb(DclareConfig config, boolean oo2fb, boolean fb2oo, boolean oo observe(right, ft -> mrol.get(rf), oo2fbDir). // observe(left, ft -> opp.get(rf) != null && compare(n.get(rf), n.get(opp.get(rf))) > 0 ? mrol.get(opp.get(rf)) : create(ROL, y -> y. // observe(n, rl -> "~", oo2fbDir). // - observe(otr, rl -> mobt.get((TestNewable) rf.dParent()), oo2fbDir) // + observe(otr, rl -> rf.dParent() != null ? mobt.get((TestNewable) rf.dParent()) : null, oo2fbDir) // ), oo2fbDir) // ) : null, oo2fbDir); } From 8c68c2718acde80abba91c5191d5d9e49dd9ff76 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 2 Jul 2024 12:20:11 +0200 Subject: [PATCH 046/179] defer removal of all freshly contained Mutables (not only Newables) --- .../org/modelingvalue/dclare/ObserverTransaction.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 0e2be3a5..d9efb32a 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -496,18 +496,16 @@ private boolean changed(O object, Observed observed, IState preStat isChildChanged(observed, pre, preState, postState) || isChildChanged(observed, post, preState, postState); } - @SuppressWarnings("unused") private boolean becameDerived(Observed observed, E element, IState preState, IState postState) { return element instanceof Newable && ((Newable) element).dInitialConstruction().isDerived() && // preState.get((Newable) element, Newable.D_ALL_DERIVATIONS).isEmpty() && // !postState.get((Newable) element, Newable.D_ALL_DERIVATIONS).isEmpty(); } - @SuppressWarnings("unused") private boolean becameContained(Observed observed, E element, IState preState, IState postState) { - return element instanceof Newable && // - preState.get((Newable) element, Mutable.D_PARENT_CONTAINING) == null && // - postState.get((Newable) element, Mutable.D_PARENT_CONTAINING) != null; + return element instanceof Mutable && // + preState.get((Mutable) element, Mutable.D_PARENT_CONTAINING) == null && // + postState.get((Mutable) element, Mutable.D_PARENT_CONTAINING) != null; } private boolean isChildChanged(Observed observed, E element, IState preState, IState postState) { @@ -528,7 +526,6 @@ private , E> boolean isRemoved(O object, Ob (postState == state() || !observed.collection(postState.get(object, observed)).contains(added)); } - @SuppressWarnings("unused") private boolean isChangedBack(O object, Observed observed, T pre, T post, IState preState, IState postState) { T before = preState.get(object, observed); return Objects.equals(before, post) && // From 88488711207526557925e09c656efc32ecd945c6 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 9 Jul 2024 11:57:47 +0200 Subject: [PATCH 047/179] derivation ripple out / merge --- .../modelingvalue/dclare/AbstractDerivationTransaction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 0f495a2d..0ebf60e1 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -204,6 +204,9 @@ private T set(O object, Setable setable, T post, T nonDerived) { Constant constant = observed.constant(); T pre = isDerived && derived.isSet() ? derived.get() : mem.isSet(iLeafTransaction, object, constant) ? mem.get(iLeafTransaction, object, constant) : nonDerived; T result = match(mem, observed, pre, post); + if (isDerived && derived.isSet() && !Objects.equals(pre, nonDerived) && Objects.equals(result, nonDerived)) { + return post; + } if (isDerived) { derived.set(result); } else { From 7ec2b490ccaab310f66ee98553f46481197be6eb Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Sep 2024 12:20:34 +0200 Subject: [PATCH 048/179] NoCurrentTransactionException --- .../java/org/modelingvalue/dclare/Constant.java | 14 +++++++------- .../java/org/modelingvalue/dclare/Getable.java | 3 ++- .../java/org/modelingvalue/dclare/Observer.java | 2 +- .../dclare/ex/NoCurrentTransactionException.java | 12 ++++++++++++ 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index 2e37c61b..5b658b88 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -88,7 +88,7 @@ public boolean isDurable() { @Override public T set(O object, BiFunction function, E element) { - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.set(leafTransaction, object, this, function, element); } @@ -98,38 +98,38 @@ public T set(O object, T value) { if (deriver != null) { throw new Error("Constant " + this + " is derived"); } - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.set(leafTransaction, object, this, value, false); } public T force(O object, T value) { - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.set(leafTransaction, object, this, value, true); } @Override public T get(O object) { - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.get(leafTransaction, object, this); } public O object(O object) { - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.object(leafTransaction, object); } public T get(O object, Function deriver) { - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.get(leafTransaction, object, this, deriver); } public boolean isSet(O object) { - LeafTransaction leafTransaction = LeafTransaction.getCurrent(); + LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); return constants.isSet(leafTransaction, object, this); } diff --git a/src/main/java/org/modelingvalue/dclare/Getable.java b/src/main/java/org/modelingvalue/dclare/Getable.java index 07a5055d..9aa4a622 100644 --- a/src/main/java/org/modelingvalue/dclare/Getable.java +++ b/src/main/java/org/modelingvalue/dclare/Getable.java @@ -28,6 +28,7 @@ import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Internable; import org.modelingvalue.collections.util.StringUtil; +import org.modelingvalue.dclare.ex.NoCurrentTransactionException; @SuppressWarnings("unused") public abstract class Getable implements Feature, Internable { @@ -93,7 +94,7 @@ public T pre(O object) { protected LeafTransaction currentLeaf(O object) { LeafTransaction current = LeafTransaction.getCurrent(); if (current == null) { - throw new NullPointerException("No current transaction in " + Thread.currentThread() + " , while accessing " + toString()); + throw new NoCurrentTransactionException(object, this, "No current transaction in " + Thread.currentThread()); } else if (object == null) { throw new NullPointerException("Object is null, while accessing " + current.state().get((this::toString))); } diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index bee7fd0a..916b8061 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -238,7 +238,7 @@ public Set checkConsistency(State state, Mutable object, List< for (ObserverTrace trace : post) { result = result.add(new DebugTrace(object, observer(), trace)); } - if (!LeafTransaction.getCurrent().universeTransaction().stats().debugging()) { + if (!currentLeaf(object).universeTransaction().stats().debugging()) { set(object, getDefault(object)); } } diff --git a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java new file mode 100644 index 00000000..ca9a5e9b --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java @@ -0,0 +1,12 @@ +package org.modelingvalue.dclare.ex; + +import org.modelingvalue.dclare.Feature; + +public class NoCurrentTransactionException extends ConsistencyError { + private static final long serialVersionUID = -2609383619673309143L; + + public NoCurrentTransactionException(Object object, Feature feature, String message) { + super(object, feature, 20, message); + } + +} From 95b6fed9f7bdfb48ca5ebed3c6ec8d39cdbfb9f0 Mon Sep 17 00:00:00 2001 From: automation Date: Fri, 6 Sep 2024 10:21:28 +0000 Subject: [PATCH 049/179] [no-ci] updated by mvgplugin --- .../ex/NoCurrentTransactionException.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java index ca9a5e9b..55304501 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare.ex; import org.modelingvalue.dclare.Feature; From 7bd095c778ca59e4a537ae5610907eae5888a52d Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 13 Sep 2024 14:44:26 +0200 Subject: [PATCH 050/179] immediate imperative transactions --- .../dclare/ImperativeTransaction.java | 34 +++++++++++---- .../dclare/MutableTransaction.java | 18 ++++++-- .../dclare/UniverseTransaction.java | 42 +++++++++++++++++-- .../dclare/sync/DeltaAdaptor.java | 2 +- .../dclare/test/support/TestUniverse.java | 2 +- 5 files changed, 80 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 4e0f8fe8..94c3b855 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -37,8 +37,8 @@ public class ImperativeTransaction extends LeafTransaction { protected static final DefaultMap> SETTED_MAP = DefaultMap.of(k -> Set.of()); @SuppressWarnings("rawtypes") - public static ImperativeTransaction of(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler, boolean keepTransaction) { - return new ImperativeTransaction(cls, init, universeTransaction, scheduler, diffHandler, keepTransaction); + public static ImperativeTransaction of(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler, boolean keepTransaction, boolean immediate) { + return new ImperativeTransaction(cls, init, universeTransaction, scheduler, diffHandler, keepTransaction, immediate); } private final static Setable CHANGE_NR = Setable.of("$CHANGE_NR", 0L); @@ -49,6 +49,7 @@ public static ImperativeTransaction of(Imperative cls, State init, UniverseTrans private final NamedIdentity actionId; private final Direction direction; private final MutableState state; + private final boolean immediate; private boolean active; private boolean commiting; @@ -58,8 +59,9 @@ public static ImperativeTransaction of(Imperative cls, State init, UniverseTrans private DefaultMap> allSetted; @SuppressWarnings("rawtypes") - protected ImperativeTransaction(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler, boolean keepTransaction) { + protected ImperativeTransaction(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler, boolean keepTransaction, boolean immediate) { super(universeTransaction); + this.immediate = immediate; this.state = universeTransaction.createMutableState(init); this.setted = SETTED_MAP; this.allSetted = SETTED_MAP; @@ -153,14 +155,24 @@ private void dclare2imper(State dclare, boolean timeTraveling, boolean insync) { diffHandler.handleDelta(imper, dclare, insync, finalAllSetted); } - @SuppressWarnings({"rawtypes", "unchecked"}) + @SuppressWarnings("rawtypes") private void imper2dclare() { State imper = state(); - DefaultMap> finalSetted = setted; + DefaultMap> changed = setted; setted = SETTED_MAP; - universeTransaction().put(Action.of(actionId, u -> { + Action action = changeAction(imper, changed); + if (immediate) { + universeTransaction().offer(action); + } else { + universeTransaction().put(action); + } + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + private Action changeAction(State imper, DefaultMap> changed) { + return Action.of(actionId, u -> { try { - finalSetted.forEachOrdered(e -> { + changed.forEachOrdered(e -> { DefaultMap props = imper.getProperties(e.getKey()); for (Setable p : e.getValue()) { if (p instanceof Queued && ((Queued) p).actions()) { @@ -177,7 +189,7 @@ private void imper2dclare() { CHANGE_NR.set(ImperativeTransaction.this, imper.get(ImperativeTransaction.this, CHANGE_NR)); universeTransaction().handleException(t); } - }, direction, LeafModifier.preserved)); + }, direction, LeafModifier.preserved); } @Override @@ -226,7 +238,11 @@ private void change(O object, Setable property, T preValue, T postV active = true; universeTransaction().addActive(this); } - universeTransaction().commit(); + if (immediate) { + schedule(this::imper2dclare); + } else { + universeTransaction().commit(); + } } } } diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index 6a07f87d..086b73ae 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -136,17 +136,17 @@ private void run(Set> actions, Set children) { } if (random.size() <= 2 || universeTransaction().getConfig().isRunSequential()) { runSequential(random); - if (!universeTransaction().isKilled() && (parent() == null || !hasQueued(state[0], parent().mutable(), one))) { - move(mutable(), one, zero); + if (!universeTransaction().isKilled() && !hasToGoUp()) { + moveOneToZero(); } } else { List begin = random.sublist(0, random.size() >> 1); runParallel(begin); if (!universeTransaction().isKilled()) { - if (parent() == null || !hasQueued(state[0], parent().mutable(), one)) { + if (!hasToGoUp()) { state[0] = state[0].set(mutable(), state[0].actions(zero), Set::addAll, actions.removeAll(begin)); state[0] = state[0].set(mutable(), state[0].children(zero), Set::addAll, children.removeAll(begin)); - move(mutable(), one, zero); + moveOneToZero(); } else { state[0] = state[0].set(mutable(), state[0].actions(one), Set::addAll, actions.removeAll(begin)); state[0] = state[0].set(mutable(), state[0].children(one), Set::addAll, children.removeAll(begin)); @@ -156,6 +156,16 @@ private void run(Set> actions, Set children) { } + private void moveOneToZero() { + if (parent() != null || !universeTransaction().poll(state)) { + move(mutable(), one, zero); + } + } + + private boolean hasToGoUp() { + return parent() != null && (hasQueued(state[0], parent().mutable(), one) || universeTransaction().hasImmediate()); + } + private void runParallel(List todo) { if (todo.size() > 1) { try { diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 24a81363..7eec772b 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -25,6 +25,7 @@ import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; @@ -69,9 +70,11 @@ public class UniverseTransaction extends MutableTransaction { private final Action clearOrphans = Action.of("$clearOrphans", this::clearOrphans); private final Action checkConsistency = Action.of("$checkConsistency", this::checkConsistency); private final Action deriveLazy = Action.of("$deriveLazy", this::deriveLazy); + private final Action poll = Action.of("$poll", this::poll); // private final boolean pull; protected final BlockingQueue> inQueue; + protected final ConcurrentLinkedQueue> immediateQueue; private final BlockingQueue resultQueue = new LinkedBlockingQueue<>(1); //TODO wire onto MoodManager private final State emptyState = createState(StateMap.EMPTY_STATE_MAP); private final State startState; @@ -182,6 +185,7 @@ public UniverseTransaction(Universe universe, ContextPool pool, boolean pull, Dc statusProvider = new StatusProvider<>(this, startStatus); this.config = Objects.requireNonNull(config); inQueue = new LinkedBlockingQueue<>(config.getMaxInInQueue()); + immediateQueue = new ConcurrentLinkedQueue<>(); universeStatistics = new UniverseStatistics(this); start(universe, null); preState = startState; @@ -283,7 +287,7 @@ public void run() { runActions(postActions); } commit(state, timeTraveling, imperativeTransactions.iterator()); - if (!killed && inQueue.isEmpty() && isStopped(state)) { + if (!killed && inQueue.isEmpty() && immediateQueue.isEmpty() && isStopped(state)) { break; } } catch (Throwable t) { @@ -490,7 +494,11 @@ private Priority hasQueued(State state) { } public int numInQueue() { - return inQueue.size(); + return inQueue.size() + immediateQueue.size(); + } + + protected boolean hasImmediate() { + return !immediateQueue.isEmpty(); } public boolean isHandling() { //TODO wire onto MoodManager @@ -652,6 +660,13 @@ public void put(Action action) { } } + public void offer(Action action) { + if (!killed) { + immediateQueue.offer(action); + put(poll); + } + } + private Action take() { try { return inQueue.take(); @@ -660,6 +675,23 @@ private Action take() { } } + protected boolean poll(State[] state) { + Action action = immediateQueue.poll(); + if (action != null) { + state[0] = state[0].set(universe(), state[0].actions(Priority.zero), Set::add, action); + return true; + } else { + return false; + } + } + + protected void poll(Universe universe) { + Action action = immediateQueue.poll(); + if (action != null) { + action.trigger(universe); + } + } + protected void end(State state) { //TODO wire onto MoodManager try { resultQueue.put(state); @@ -707,7 +739,11 @@ public void addPostAction(Action action) { } public ImperativeTransaction addImperative(String id, StateDeltaHandler diffHandler, Consumer scheduler, boolean keepTransaction) { - ImperativeTransaction n = ImperativeTransaction.of(Imperative.of(id), preState, this, scheduler, diffHandler, keepTransaction); + return addImperative(id, diffHandler, scheduler, keepTransaction, false); + } + + public ImperativeTransaction addImperative(String id, StateDeltaHandler diffHandler, Consumer scheduler, boolean keepTransaction, boolean immediate) { + ImperativeTransaction n = ImperativeTransaction.of(Imperative.of(id), preState, this, scheduler, diffHandler, keepTransaction, immediate); synchronized (this) { imperativeTransactions = imperativeTransactions.add(n); } diff --git a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java index 5c023de8..34c95af8 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java +++ b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java @@ -56,7 +56,7 @@ public DeltaAdaptor(String name, UniverseTransaction tx, SerializationHelper Date: Fri, 13 Sep 2024 15:16:39 +0200 Subject: [PATCH 051/179] improve immediate --- .../dclare/ImperativeTransaction.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 94c3b855..b80501f2 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -125,7 +125,7 @@ public final boolean commit(State dclare, boolean timeTraveling) { } if (!setted.isEmpty()) { insync = false; - imper2dclare(); + universeTransaction().put(imper2dclare()); } else if (insync && active) { active = false; universeTransaction().removeActive(this); @@ -155,17 +155,16 @@ private void dclare2imper(State dclare, boolean timeTraveling, boolean insync) { diffHandler.handleDelta(imper, dclare, insync, finalAllSetted); } + private void immediate() { + universeTransaction().offer(imper2dclare()); + } + @SuppressWarnings("rawtypes") - private void imper2dclare() { + private Action imper2dclare() { State imper = state(); DefaultMap> changed = setted; setted = SETTED_MAP; - Action action = changeAction(imper, changed); - if (immediate) { - universeTransaction().offer(action); - } else { - universeTransaction().put(action); - } + return changeAction(imper, changed); } @SuppressWarnings({"rawtypes", "unchecked"}) @@ -239,7 +238,7 @@ private void change(O object, Setable property, T preValue, T postV universeTransaction().addActive(this); } if (immediate) { - schedule(this::imper2dclare); + schedule(this::immediate); } else { universeTransaction().commit(); } From 941fa4c50849c457031ebca6f10f78a1206b5993 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 13 Sep 2024 15:19:09 +0200 Subject: [PATCH 052/179] optimization --- .../java/org/modelingvalue/dclare/ImperativeTransaction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index b80501f2..779dec76 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -156,7 +156,9 @@ private void dclare2imper(State dclare, boolean timeTraveling, boolean insync) { } private void immediate() { - universeTransaction().offer(imper2dclare()); + if (!setted.isEmpty()) { + universeTransaction().offer(imper2dclare()); + } } @SuppressWarnings("rawtypes") From c032648430633649f160c79e61b620d65136bf39 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sat, 14 Sep 2024 09:28:44 +0200 Subject: [PATCH 053/179] modifiers for imperatives --- .../java/org/modelingvalue/dclare/Action.java | 6 ++-- .../dclare/CoreLeafModifier.java | 30 +++++++++++++++++++ .../org/modelingvalue/dclare/Imperative.java | 13 ++++++++ .../dclare/ImperativeTransaction.java | 14 ++++----- .../modelingvalue/dclare/LeafModifier.java | 29 ------------------ .../org/modelingvalue/dclare/Observer.java | 4 +-- .../dclare/UniverseTransaction.java | 8 ++--- .../dclare/sync/DeltaAdaptor.java | 2 +- .../dclare/test/support/TestNewable.java | 8 ++--- .../dclare/test/support/TestUniverse.java | 2 +- 10 files changed, 62 insertions(+), 54 deletions(-) create mode 100644 src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index 3732d3ff..c19f2e12 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -37,15 +37,15 @@ public static Action of(Object id, Consumer action, Le private final Direction direction; private final boolean preserved; private final boolean read; - private long durationNano = -1; + private long durationNano = -1; protected Action(Object id, Consumer action, LeafModifier... modifiers) { super(id, modifiers); this.action = action; Direction dir = getModifier(Direction.class); this.direction = dir == null ? Direction.DEFAULT : dir; - this.preserved = hasModifier(LeafModifier.preserved); - this.read = hasModifier(LeafModifier.read); + this.preserved = hasModifier(CoreLeafModifier.preserved); + this.read = hasModifier(CoreLeafModifier.read); } @Override diff --git a/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java b/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java new file mode 100644 index 00000000..f5f65e53 --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java @@ -0,0 +1,30 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +package org.modelingvalue.dclare; + +public enum CoreLeafModifier implements LeafModifier> { + anonymous, + preserved, + atomic, + read, + immediate, + keep; +} diff --git a/src/main/java/org/modelingvalue/dclare/Imperative.java b/src/main/java/org/modelingvalue/dclare/Imperative.java index 6c41732e..34bd3c3b 100644 --- a/src/main/java/org/modelingvalue/dclare/Imperative.java +++ b/src/main/java/org/modelingvalue/dclare/Imperative.java @@ -26,8 +26,13 @@ public static Imperative of(String id, LeafModifier... modifiers) { return new Imperative(id, modifiers); } + private final boolean immediate; + private final boolean keep; + protected Imperative(String id, LeafModifier... modifiers) { super(id, modifiers); + this.immediate = hasModifier(CoreLeafModifier.immediate); + this.keep = hasModifier(CoreLeafModifier.keep); } @Override @@ -50,4 +55,12 @@ public ImperativeTransaction newTransaction(UniverseTransaction universeTransact throw new UnsupportedOperationException(); } + public boolean immediate() { + return immediate; + } + + public boolean keep() { + return keep; + } + } diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 779dec76..ad17dc39 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -37,8 +37,8 @@ public class ImperativeTransaction extends LeafTransaction { protected static final DefaultMap> SETTED_MAP = DefaultMap.of(k -> Set.of()); @SuppressWarnings("rawtypes") - public static ImperativeTransaction of(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler, boolean keepTransaction, boolean immediate) { - return new ImperativeTransaction(cls, init, universeTransaction, scheduler, diffHandler, keepTransaction, immediate); + public static ImperativeTransaction of(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler) { + return new ImperativeTransaction(cls, init, universeTransaction, scheduler, diffHandler); } private final static Setable CHANGE_NR = Setable.of("$CHANGE_NR", 0L); @@ -49,7 +49,6 @@ public static ImperativeTransaction of(Imperative cls, State init, UniverseTrans private final NamedIdentity actionId; private final Direction direction; private final MutableState state; - private final boolean immediate; private boolean active; private boolean commiting; @@ -59,9 +58,8 @@ public static ImperativeTransaction of(Imperative cls, State init, UniverseTrans private DefaultMap> allSetted; @SuppressWarnings("rawtypes") - protected ImperativeTransaction(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler, boolean keepTransaction, boolean immediate) { + protected ImperativeTransaction(Imperative cls, State init, UniverseTransaction universeTransaction, Consumer scheduler, StateDeltaHandler diffHandler) { super(universeTransaction); - this.immediate = immediate; this.state = universeTransaction.createMutableState(init); this.setted = SETTED_MAP; this.allSetted = SETTED_MAP; @@ -69,7 +67,7 @@ protected ImperativeTransaction(Imperative cls, State init, UniverseTransaction this.direction = Direction.of(cls.id()); this.actionId = NamedIdentity.of(this, cls.id().toString()); super.start(cls, universeTransaction); - this.scheduler = keepTransaction ? r -> scheduler.accept(() -> { + this.scheduler = cls.keep() ? r -> scheduler.accept(() -> { if (isOpen()) { LeafTransaction.getContext().setOnThread(this); try { @@ -190,7 +188,7 @@ private Action changeAction(State imper, DefaultMap void change(O object, Setable property, T preValue, T postV active = true; universeTransaction().addActive(this); } - if (immediate) { + if (imperative().immediate()) { schedule(this::immediate); } else { universeTransaction().commit(); diff --git a/src/main/java/org/modelingvalue/dclare/LeafModifier.java b/src/main/java/org/modelingvalue/dclare/LeafModifier.java index 9b6f1e6e..64ee7e13 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/LeafModifier.java @@ -21,33 +21,4 @@ package org.modelingvalue.dclare; public interface LeafModifier> extends FeatureModifier { - - static LeafModifier> anonymous = new LeafModifier<>() { - @Override - public String toString() { - return "anonymous"; - } - }; - - static LeafModifier> preserved = new LeafModifier<>() { - @Override - public String toString() { - return "preserved"; - } - }; - - static LeafModifier> atomic = new LeafModifier<>() { - @Override - public String toString() { - return "atomic"; - } - }; - - static LeafModifier> read = new LeafModifier<>() { - @Override - public String toString() { - return "read"; - } - }; - } diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index 916b8061..a1dee466 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -126,8 +126,8 @@ protected Observer(Object id, Consumer action, Set> targets, Le exception = ExceptionSetable.of(this); constructed = Constructed.of(this); this.targets = targets; - this.anonymous = hasModifier(LeafModifier.anonymous); - this.atomic = hasModifier(LeafModifier.atomic); + this.anonymous = hasModifier(CoreLeafModifier.anonymous); + this.atomic = hasModifier(CoreLeafModifier.atomic); } public Observerds observeds() { diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 7eec772b..75de340a 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -738,12 +738,8 @@ public void addPostAction(Action action) { } } - public ImperativeTransaction addImperative(String id, StateDeltaHandler diffHandler, Consumer scheduler, boolean keepTransaction) { - return addImperative(id, diffHandler, scheduler, keepTransaction, false); - } - - public ImperativeTransaction addImperative(String id, StateDeltaHandler diffHandler, Consumer scheduler, boolean keepTransaction, boolean immediate) { - ImperativeTransaction n = ImperativeTransaction.of(Imperative.of(id), preState, this, scheduler, diffHandler, keepTransaction, immediate); + public ImperativeTransaction addImperative(String id, StateDeltaHandler diffHandler, Consumer scheduler, LeafModifier... modifiers) { + ImperativeTransaction n = ImperativeTransaction.of(Imperative.of(id, modifiers), preState, this, scheduler, diffHandler); synchronized (this) { imperativeTransactions = imperativeTransactions.add(n); } diff --git a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java index 34c95af8..e6a0d18d 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java +++ b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java @@ -56,7 +56,7 @@ public DeltaAdaptor(String name, UniverseTransaction tx, SerializationHelper action, LeafModifier... modifiers) { - return super.observe(this::isActive, action, FeatureModifier.add(modifiers, direction(), LeafModifier.anonymous)); + return super.observe(this::isActive, action, FeatureModifier.add(modifiers, direction(), CoreLeafModifier.anonymous)); } @Override @SuppressWarnings("unchecked") public final TestNewableClass observe(Setable setable, SerializableFunction value, LeafModifier... modifiers) { - return super.observe(this::isActive, setable, value, FeatureModifier.add(modifiers, direction(), LeafModifier.anonymous)); + return super.observe(this::isActive, setable, value, FeatureModifier.add(modifiers, direction(), CoreLeafModifier.anonymous)); } @Override @SuppressWarnings("unchecked") public TestNewableClass observe(SerializablePredicate predicate, SerializableConsumer action, LeafModifier... modifiers) { SerializablePredicate a = this::isActive; - return (TestNewableClass) super.observe((t) -> a.test(t) && predicate.test(t), action, FeatureModifier.add(modifiers, direction(), LeafModifier.anonymous)); + return (TestNewableClass) super.observe((t) -> a.test(t) && predicate.test(t), action, FeatureModifier.add(modifiers, direction(), CoreLeafModifier.anonymous)); } @Override @SuppressWarnings("unchecked") public TestNewableClass observe(SerializablePredicate predicate, Setable setable, SerializableFunction value, LeafModifier... modifiers) { SerializablePredicate a = this::isActive; - return (TestNewableClass) super.observe((t) -> a.test(t) && predicate.test(t), setable, value, FeatureModifier.add(modifiers, direction(), LeafModifier.anonymous)); + return (TestNewableClass) super.observe((t) -> a.test(t) && predicate.test(t), setable, value, FeatureModifier.add(modifiers, direction(), CoreLeafModifier.anonymous)); } private boolean isActive(TestMutable object) { diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java index 636aeddb..d61d8f36 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java @@ -63,7 +63,7 @@ public void init() { } } }); - }, scheduler, false, false); + }, scheduler); } @Override From 747591f5236b97dab19991d6767c1d7ff2500fd7 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 16 Sep 2024 13:29:40 +0200 Subject: [PATCH 054/179] dHasParentCycle utility method --- src/main/java/org/modelingvalue/dclare/Mutable.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 096c0ed8..ea1115d7 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -271,4 +271,15 @@ private ParentContaining(Object id, SetableModifier... modifiers) { } } + default boolean dHasParentCycle(State state) { + List ancestors = List.of(this); + for (Mutable parent = state.getA(this, D_PARENT_CONTAINING); parent != null; parent = state.getA(parent, D_PARENT_CONTAINING)) { + if (ancestors.contains(parent)) { + return true; + } + ancestors = ancestors.add(parent); + } + return false; + } + } From 50cc205151694dbc4a41af6b09674db2a2aa05e9 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 23 Sep 2024 18:37:30 +0200 Subject: [PATCH 055/179] removed QualifiedDefaultSet --- .../dclare/test/CommunicationTests.java | 14 +++++---- .../test/support/CommunicationPeer.java | 2 +- .../dclare/test/support/ModelMaker.java | 30 ++++++------------- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java index 6615d359..209b68b3 100644 --- a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java @@ -27,9 +27,15 @@ import java.io.IOException; import java.util.ConcurrentModificationException; -import org.junit.jupiter.api.*; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.modelingvalue.collections.util.TraceTimer; -import org.modelingvalue.dclare.test.support.*; +import org.modelingvalue.dclare.test.support.CommunicationHelper; +import org.modelingvalue.dclare.test.support.CommunicationPeer; +import org.modelingvalue.dclare.test.support.ModelMaker; +import org.modelingvalue.dclare.test.support.PeerTester; +import org.modelingvalue.dclare.test.support.TestDeltaAdaptor; public class CommunicationTests { static { @@ -82,8 +88,6 @@ public void universeSyncWithinOneJVM() { assertEquals(NEW_VALUE, b.getXyzzy_aDefMap().size()); assertEquals(NEW_VALUE, a.getXyzzy_aQuaSet().size()); assertEquals(NEW_VALUE, b.getXyzzy_aQuaSet().size()); - assertEquals(NEW_VALUE, a.getXyzzy_aQuaDefSet().size()); - assertEquals(NEW_VALUE, b.getXyzzy_aQuaDefSet().size()); assertEquals("~1", a.getXyzzy_aList().get(1)); assertEquals("~1", b.getXyzzy_aList().get(1)); @@ -95,8 +99,6 @@ public void universeSyncWithinOneJVM() { assertEquals("1!dm!v!", b.getXyzzy_aDefMap().get("1!dm!k!")); assertEquals("QS1", a.getXyzzy_aQuaSet().get("QS1")); assertEquals("QS1", b.getXyzzy_aQuaSet().get("QS1")); - assertEquals("QDS1", a.getXyzzy_aQuaDefSet().get("QDS1")); - assertEquals("QDS1", b.getXyzzy_aQuaDefSet().get("QDS1")); } busyWaitAllForIdle(); } diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java index a2bd6aff..af963b01 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java @@ -60,7 +60,7 @@ protected void execute(String delta) { // delta robot->main AtomicBoolean stop = new AtomicBoolean(); CommunicationHelper.interpreter(System.in, stop, Map.of(Entry.of('.', (c, line) -> System.out.println("." + line)), Entry.of('D', (c, line) -> mmSlaveAdaptor.accept(line)), // delta main->robot - Entry.of('C', (c, line) -> check(line, mmSlave.getXyzzy_source(), mmSlave.getXyzzy_target(), mmSlave.getXyzzy_aList().size(), mmSlave.getXyzzy_aSet().size() / 2, mmSlave.getXyzzy_aMap().size(), mmSlave.getXyzzy_aDefMap().size(), mmSlave.getXyzzy_aQuaSet().size(), mmSlave.getXyzzy_aQuaDefSet().size())), Entry.of('Q', (c, line) -> stop.set(true)), Entry.of('*', (c, line) -> exit(10, "ERROR: unknown command " + c + line)))); + Entry.of('C', (c, line) -> check(line, mmSlave.getXyzzy_source(), mmSlave.getXyzzy_target(), mmSlave.getXyzzy_aList().size(), mmSlave.getXyzzy_aSet().size() / 2, mmSlave.getXyzzy_aMap().size(), mmSlave.getXyzzy_aDefMap().size(), mmSlave.getXyzzy_aQuaSet().size())), Entry.of('Q', (c, line) -> stop.set(true)), Entry.of('*', (c, line) -> exit(10, "ERROR: unknown command " + c + line)))); CommunicationHelper.tearDownAll(); System.err.println("peer stopped"); diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index ce613f90..3cbb5f2d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -20,17 +20,23 @@ package org.modelingvalue.dclare.test.support; +import static org.junit.jupiter.api.Assertions.assertAll; +import static org.junit.jupiter.api.Assertions.fail; +import static org.modelingvalue.collections.util.TraceTimer.traceLog; +import static org.modelingvalue.dclare.CoreSetableModifier.containment; + +import java.util.function.Predicate; + import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.DefaultMap; import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; -import org.modelingvalue.collections.QualifiedDefaultSet; import org.modelingvalue.collections.QualifiedSet; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Concurrent; -import org.modelingvalue.collections.util.ContextThread; import org.modelingvalue.collections.util.ContextPool; +import org.modelingvalue.collections.util.ContextThread; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.dclare.Constant; import org.modelingvalue.dclare.DclareConfig; @@ -41,13 +47,6 @@ import org.modelingvalue.dclare.sync.SerializationHelper; import org.modelingvalue.dclare.sync.Util; -import java.util.function.Predicate; - -import static org.junit.jupiter.api.Assertions.assertAll; -import static org.junit.jupiter.api.Assertions.fail; -import static org.modelingvalue.collections.util.TraceTimer.traceLog; -import static org.modelingvalue.dclare.CoreSetableModifier.containment; - @SuppressWarnings({"FieldCanBeLocal", "unchecked", "rawtypes"}) public class ModelMaker { // TODO: need to fix the bug and remove this workaround: @@ -68,7 +67,6 @@ public class ModelMaker { private static final Observed> aMap = TestObserved.of("#aMap", ModelMaker::id, ModelMaker::desMap, Map.of()); private static final Observed> aDefMap = TestObserved.of("#aDefMap", ModelMaker::id, ModelMaker::desDefMap, DefaultMap.of(k -> "zut")); private static final Observed> aQuaSet = TestObserved.of("#aQuaSet", ModelMaker::id, ModelMaker::desQuaSet, QualifiedSet.of(v -> v)); - private static final Observed> aQuaDefSet = TestObserved.of("#aQuaDefSet", ModelMaker::id, ModelMaker::desQuaDefSet, QualifiedDefaultSet.of(v -> v, k -> "zutje")); public static final SerializationHelper> SERIALIZATION_HELPER = new SerializationHelper<>() { //////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -183,11 +181,6 @@ private static QualifiedSet desQuaSet(TestMutable mutable, TestO return obs.getDefault(mutable).addAll(oo); } - private static QualifiedDefaultSet desQuaDefSet(TestMutable mutable, TestObserved> obs, Object o) { - List oo = (List) o; - return obs.getDefault(mutable).addAll(oo); - } - private static final TestMutableClass extraClass = TestMutableClass.of("ExtraClass"); private static final TestMutableClass plughClassMain = TestMutableClass.of("PlughClass").observe( // o -> target.set(o, source.get(o))).observe( // @@ -204,8 +197,7 @@ private static QualifiedDefaultSet desQuaDefSet(TestMutable muta o -> aSet.set(o, Collection.range(0, source.get(o)).flatMap(i -> Collection.of("&" + i, "@" + i * 2)).asSet())).observe( // o -> aMap.set(o, Collection.range(0, source.get(o)).asMap(i -> Entry.of(i + "!m!k!", i + "!m!v!")))).observe( // o -> aDefMap.set(o, aDefMap.getDefault(o).addAll(Collection.range(0, source.get(o)).map(i -> Entry.of(i + "!dm!k!", i + "!dm!v!"))))).observe( // - o -> aQuaSet.set(o, aQuaSet.getDefault(o).addAll(Collection.range(0, source.get(o)).map(i -> "QS" + i)))).observe( // - o -> aQuaDefSet.set(o, aQuaDefSet.getDefault(o).addAll(Collection.range(0, source.get(o)).map(i -> "QDS" + i)))); + o -> aQuaSet.set(o, aQuaSet.getDefault(o).addAll(Collection.range(0, source.get(o)).map(i -> "QS" + i)))); private final String name; private final TestMutable xyzzy; private final Constant plugConst; @@ -296,10 +288,6 @@ public QualifiedSet getXyzzy_aQuaSet() { return tx.currentState().get(xyzzy, aQuaSet); } - public QualifiedDefaultSet getXyzzy_aQuaDefSet() { - return tx.currentState().get(xyzzy, aQuaDefSet); - } - public TestMutable getXyzzy_extra() { return tx.currentState().get(xyzzy, extra); } From dab4b359d22513c57fc7b4dcc5a6e76a2c0b4fb4 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 5 Nov 2024 09:35:16 +0100 Subject: [PATCH 056/179] try prune only --- src/main/java/org/modelingvalue/dclare/ConstantState.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 5f888f4d..daee74c8 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -377,7 +377,11 @@ private QualifiedSet pruneEqualHashes(O object, Qualified } } } - allWithEqualhash = prev.allWithEqualhash(object); + if (i == 0) { + break; + } else { + allWithEqualhash = prev.allWithEqualhash(object); + } } return prev; } From cfd80f891979271eba27527766f58f751b70ed83 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 7 Nov 2024 14:05:15 +0100 Subject: [PATCH 057/179] restrict matching single containments --- src/main/java/org/modelingvalue/dclare/ObserverTransaction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index d9efb32a..6a10fb2c 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -557,7 +557,7 @@ private Object singleMatch(Mutable object, Observed observed, Object before, Obj before = postInfo.newable(); } else if (observed.containment()) { boolean found = false; - for (Observed cont : MutableClass.D_CONTAINMENTS.get(object.dClass()).filter(Observed.class).exclude(observed::equals)) { + for (Observed cont : MutableClass.D_CONTAINMENTS.get(object.dClass()).filter(Observed.class).filter(o -> o.getClass().equals(observed.getClass())).exclude(observed::equals)) { Object val = cont.current(object); if (val instanceof Newable && ((Newable) after).dNewableType().equals(((Newable) val).dNewableType())) { if (after.equals(val)) { From 53b921f42a148598fca0169d3496520c3a73278f Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 14 Nov 2024 09:00:51 +0100 Subject: [PATCH 058/179] Logic --- .../java/org/modelingvalue/dclare/Logic.java | 419 ++++++++++++++++++ .../org/modelingvalue/dclare/Universe.java | 31 ++ .../modelingvalue/dclare/test/LogicTest.java | 53 +++ 3 files changed, 503 insertions(+) create mode 100644 src/main/java/org/modelingvalue/dclare/Logic.java create mode 100644 src/test/java/org/modelingvalue/dclare/test/LogicTest.java diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java new file mode 100644 index 00000000..2c6cba41 --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -0,0 +1,419 @@ +package org.modelingvalue.dclare; + +import java.util.function.BiPredicate; +import java.util.function.BooleanSupplier; +import java.util.function.Predicate; +import java.util.function.Supplier; + +import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.List; +import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.util.Context; +import org.modelingvalue.collections.util.Pair; +import org.modelingvalue.collections.util.Single; +import org.modelingvalue.collections.util.TriPredicate; +import org.modelingvalue.collections.util.Triple; +import org.modelingvalue.dclare.ex.NonDeterministicException; + +public final class Logic { + private Logic() { + } + + private static final Context> VARIABLES = Context.of(List.of()); + + public static abstract class ClauseType { + }; + + // Functions + + public static final Fun1 fun1(Object id, java.util.function.Function> f) { + return new Fun1(id, (o) -> f.apply(o).get()); + } + + public static final Fun1 fun1(Object id) { + return new Fun1(id, (o) -> null); + } + + public static final Fun2 fun2(Object id, java.util.function.BiFunction> f) { + return new Fun2(id, (o1, o2) -> f.apply(o1, o2).get()); + } + + public static final Fun2 fun2(Object id) { + return new Fun2(id, (o1, o2) -> null); + } + + public static final Fun3 function(Object id, org.modelingvalue.collections.util.TriFunction> f) { + return new Fun3(id, (o1, o2, o3) -> f.apply(o1, o2, o3).get()); + } + + public static final Fun3 function(Object id) { + return new Fun3(id, (o1, o2, o3) -> null); + } + + public static final class Fun1 extends ClauseType { + private final Constant, T> constant; + private final Setable, Set>> extend; + + private Fun1(Object id, java.util.function.Function f) { + extend = Setable., Set>> of(Single.of(id), Set.of()); + constant = Constant., T> of(id, o -> f.apply(o.a()), (tx, o, b, t) -> { + if (t != null) { + extend.add(Single.of(null), o); + } + }); + } + + public Supplier sup(O o) { + return () -> get(o); + } + + public T get(O o) { + return constant.get(Single.of(o)); + } + + public void set(O o, T t) { + constant.force(Single.of(o), t); + } + + @Override + public String toString() { + return constant.toString(); + } + } + + public static final class Fun2 extends ClauseType { + private final Constant, T> constant; + private final Setable, Set>> extend; + + private Fun2(Object id, java.util.function.BiFunction f) { + extend = Setable., Set>> of(Single.of(id), Set.of()); + constant = Constant., T> of(id, o -> f.apply(o.a(), o.b()), (tx, o, b, t) -> { + if (t != null) { + extend.add(Pair.of(null, null), o); + extend.add(Pair.of(o.a(), null), o); + extend.add(Pair.of(null, o.b()), o); + } + }); + } + + public Supplier sup(O1 o1, O2 o2) { + return () -> get(o1, o2); + } + + public T get(O1 o1, O2 o2) { + return constant.get(Pair.of(o1, o2)); + } + + public void set(O1 o1, O2 o2, T t) { + constant.force(Pair.of(o1, o2), t); + } + + @Override + public String toString() { + return constant.toString(); + } + } + + public static final class Fun3 extends ClauseType { + private final Constant, T> constant; + private final Setable, Set>> extend; + + private Fun3(Object id, org.modelingvalue.collections.util.TriFunction f) { + extend = Setable., Set>> of(Single.of(id), Set.of()); + constant = Constant., T> of(id, o -> f.apply(o.a(), o.b(), o.c()), (tx, o, b, t) -> { + if (t != null) { + extend.add(Triple.of(null, null, null), o); + extend.add(Triple.of(o.a(), null, null), o); + extend.add(Triple.of(null, o.b(), null), o); + extend.add(Triple.of(null, null, o.c()), o); + extend.add(Triple.of(o.a(), o.b(), null), o); + extend.add(Triple.of(o.a(), null, o.c()), o); + extend.add(Triple.of(null, o.b(), o.c()), o); + } + }); + } + + public Supplier sup(O1 o1, O2 o2, O3 o3) { + return () -> get(o1, o2, o3); + } + + public T get(O1 o1, O2 o2, O3 o3) { + return constant.get(Triple.of(o1, o2, o3)); + } + + public void set(O1 o1, O2 o2, O3 o3, T t) { + constant.force(Triple.of(o1, o2, o3), t); + } + + @Override + public String toString() { + return constant.toString(); + } + + } + + // Relations + + public static final Rel1 rel1(Object id, java.util.function.Function p) { + return new Rel1(id, (o) -> p.apply(o).getAsBoolean()); + } + + public static final Rel1 rel1(Object id) { + return new Rel1(id, (o) -> false); + } + + public static final Rel2 rel2(Object id, java.util.function.BiFunction p) { + return new Rel2(id, (o1, o2) -> p.apply(o1, o2).getAsBoolean()); + } + + public static final Rel2 rel2(Object id) { + return new Rel2(id, (o1, o2) -> false); + } + + public static final Rel3 rel3(Object id, org.modelingvalue.collections.util.TriFunction p) { + return new Rel3(id, (o1, o2, o3) -> p.apply(o1, o2, o3).getAsBoolean()); + } + + public static final Rel3 rel3(Object id) { + return new Rel3(id, (o1, o2, o3) -> false); + } + + public static final class Rel1 extends ClauseType { + private final Constant, Boolean> constant; + private final Setable, Set>> extend; + + private Rel1(Object id, Predicate p) { + extend = Setable., Set>> of(Single.of(id), Set.of()); + constant = Constant., Boolean> of(id, o -> p.test(o.a()), (tx, o, b, t) -> { + if (t != null) { + extend.add(Single.of(null), o); + } + }); + } + + @SuppressWarnings("unchecked") + public BooleanSupplier sup(O o) { + return () -> is(o); + } + + public boolean is(O o) { + return constant.get(Single.of(o)); + } + + public void set(O o) { + constant.force(Single.of(o), true); + } + + @Override + public String toString() { + return constant.toString(); + } + + } + + public static final class Rel2 extends ClauseType { + private final Constant, Boolean> constant; + private final Setable, Set>> extend; + + private Rel2(Object id, BiPredicate p) { + extend = Setable., Set>> of(Single.of(id), Set.of()); + constant = Constant., Boolean> of(id, o -> p.test(o.a(), o.b()), (tx, o, b, t) -> { + if (t) { + extend.add(Pair.of(null, null), o); + extend.add(Pair.of(o.a(), null), o); + extend.add(Pair.of(null, o.b()), o); + } + }); + } + + @SuppressWarnings("unchecked") + public BooleanSupplier sup(O1 o1, O2 o2) { + return () -> is(o1, o2); + } + + public boolean is(O1 o1, O2 o2) { + return constant.get(Pair.of(o1, o2)); + } + + public void set(O1 o1, O2 o2) { + constant.force(Pair.of(o1, o2), true); + } + + @Override + public String toString() { + return constant.toString(); + } + } + + public static final class Rel3 extends ClauseType { + private final Constant, Boolean> constant; + private final Setable, Set>> extend; + + private Rel3(Object id, TriPredicate p) { + extend = Setable., Set>> of(Single.of(id), Set.of()); + constant = Constant., Boolean> of(id, o -> p.test(o.a(), o.b(), o.c()), (tx, o, b, t) -> { + if (t) { + extend.add(Triple.of(null, null, null), o); + extend.add(Triple.of(o.a(), null, null), o); + extend.add(Triple.of(null, o.b(), null), o); + extend.add(Triple.of(null, null, o.c()), o); + extend.add(Triple.of(o.a(), o.b(), null), o); + extend.add(Triple.of(o.a(), null, o.c()), o); + extend.add(Triple.of(null, o.b(), o.c()), o); + } + }); + } + + @SuppressWarnings("unchecked") + public BooleanSupplier sup(O1 o1, O2 o2, O3 o3) { + return () -> is(o1, o2, o3); + } + + public boolean is(O1 o1, O2 o2, O3 o3) { + return constant.get(Triple.of(o1, o2, o3)); + } + + public void set(O1 o1, O2 o2, O3 o3) { + constant.force(Triple.of(o1, o2, o3), true); + } + + @Override + public String toString() { + return constant.toString(); + } + } + + // Inv + + public static final BooleanSupplier sup(boolean b) { + return () -> b; + } + + public static final Supplier sup(T t) { + return () -> t; + } + + // Not + + public static final BooleanSupplier not(BooleanSupplier predicate) { + return () -> !predicate.getAsBoolean(); + } + + // Or + + @SafeVarargs + public static final BooleanSupplier or(BooleanSupplier... predicates) { + return () -> or(List.of(predicates)); + } + + public static final BooleanSupplier any(Collection predicates) { + return () -> or(predicates.asList()); + } + + private static boolean or(List predicates) { + if (predicates.isEmpty()) { + return false; + } else if (predicates.size() == 1) { + return predicates.first().getAsBoolean(); + } else { + List or = predicates.random().asList(); + RuntimeException[] rte = new RuntimeException[1]; + boolean result = or.anyMatch(p -> { + try { + return p.getAsBoolean(); + } catch (NonDeterministicException nde) { + rte[0] = nde; + return false; + } + }); + if (!result && rte[0] != null) { + throw rte[0]; + } else { + return result; + } + } + } + + // And + + @SafeVarargs + public static final BooleanSupplier and(BooleanSupplier... predicates) { + return () -> and(List.of(predicates)); + } + + public static final BooleanSupplier all(Collection predicates) { + return () -> and(predicates.asList()); + } + + private static boolean and(List predicates) { + if (predicates.isEmpty()) { + return true; + } else if (predicates.size() == 1) { + return predicates.first().getAsBoolean(); + } else { + List and = predicates.random().asList(); + RuntimeException[] rte = new RuntimeException[1]; + boolean result = and.anyMatch(p -> { + try { + return p.getAsBoolean(); + } catch (NonDeterministicException nde) { + rte[0] = nde; + return true; + } + }); + if (result && rte[0] != null) { + throw rte[0]; + } else { + return result; + } + } + } + + // Unification + + private static final class UnboundVariableException extends RuntimeException { + private static final long serialVersionUID = 4505117271488648346L; + + private final Object var; + private final Set> vars; + + private UnboundVariableException(Object var, Set> vars) { + this.var = var; + this.vars = vars; + } + } + + private static final class Var { + } + + @SuppressWarnings("unchecked") + public static final BooleanSupplier uni(java.util.function.Function predicate) { + List vars = List.of(new Var()); + return () -> uni(vars, v -> predicate.apply((V1) v.get(0)).getAsBoolean()); + } + + @SuppressWarnings("unchecked") + public static final BooleanSupplier uni(java.util.function.BiFunction predicate) { + List vars = List.of(new Var(), new Var()); + return () -> uni(vars, v -> predicate.apply((V1) v.get(0), (V2) v.get(1)).getAsBoolean()); + } + + @SuppressWarnings("unchecked") + public static final BooleanSupplier uni(org.modelingvalue.collections.util.TriFunction predicate) { + List vars = List.of(new Var(), new Var(), new Var()); + return () -> uni(vars, v -> predicate.apply((V1) v.get(0), (V2) v.get(1), (V3) v.get(2)).getAsBoolean()); + } + + private static boolean uni(List vars, Predicate> predicate) { + try { + return VARIABLES.get(vars, () -> predicate.test(vars)); + } catch (UnboundVariableException uve) { + if (vars.contains(uve.var)) { + return any(uve.vars.map(vs -> () -> uni(vs, predicate))).getAsBoolean(); + } else { + throw uve; + } + } + } + +} diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index c6571be4..f5cbf152 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -20,6 +20,8 @@ package org.modelingvalue.dclare; +import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.Internable; public interface Universe extends Mutable, Internable { @@ -37,4 +39,33 @@ default void exit() { default boolean dIsOrphan(State state) { return false; } + + static Universe of(Feature... features) { + return new Universe() { + private final MutableClass universeClass = new MutableClass() { + + @SuppressWarnings("unchecked") + Set> observers = // + (Set>) Collection.of(features).filter(Observer.class).asSet(); + @SuppressWarnings("unchecked") + Set> setables = // + (Set>) Collection.of(features).filter(Setable.class).asSet(); + + @Override + public Set> dObservers() { + return observers; + } + + @Override + public Set> dSetables() { + return setables; + } + }; + + @Override + public MutableClass dClass() { + return universeClass; + } + }; + } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java new file mode 100644 index 00000000..3711c5a4 --- /dev/null +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -0,0 +1,53 @@ +package org.modelingvalue.dclare.test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.modelingvalue.dclare.Logic.*; +import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; + +import org.junit.jupiter.api.RepeatedTest; +import org.modelingvalue.collections.Set; +import org.modelingvalue.dclare.Logic.Fun1; +import org.modelingvalue.dclare.Logic.Rel2; +import org.modelingvalue.dclare.Universe; +import org.modelingvalue.dclare.UniverseTransaction; + +public class LogicTest { + + void run(Runnable test) { + UniverseTransaction universeTransaction = new UniverseTransaction(Universe.of(), THE_POOL); + universeTransaction.put("test", test); + universeTransaction.stop(); + universeTransaction.waitForEnd(); + } + + static final Fun1> PARENTS = fun1("parent"); + + static final Fun1> ANCESTORS = fun1("ancestor", // + (p) -> sup(PARENTS.get(p).addAll(PARENTS.get(p).flatMap(LogicTest.ANCESTORS::get)))); + + static final Rel2 PARENT = rel2("parent", // + (a, b) -> sup(PARENTS.get(a).contains(b))); + + static final Rel2 ANCESTOR1 = rel2("isAncestor", // + (a, o) -> or(PARENT.sup(o, a), // + any(PARENTS.get(o).map(p -> LogicTest.ANCESTOR1.sup(a, p))))); + + static final Rel2 ANCESTOR2 = rel2("isAncestor", // + (a, o) -> or(PARENT.sup(o, a), // + uni((String x) -> and(LogicTest.ANCESTOR1.sup(a, x), PARENT.sup(o, x))))); + + @RepeatedTest(32) + public void test1() { + run(() -> { + PARENTS.set("Jan", Set.of("Carel")); + PARENTS.set("Wim", Set.of("Jan", "Elske")); + PARENTS.set("Joppe", Set.of("Wim", "Heleen")); + PARENTS.set("Marijn", Set.of("Wim", "Heleen")); + assertEquals(ANCESTORS.sup("Joppe"), Set.of("Wim", "Heleen", "Jan", "Elske", "Carel")); + + assertTrue(ANCESTOR1.sup("Carel", "Marijn")); + assertTrue(ANCESTOR1.sup("Wim", "Marijn")); + }); + } +} From bf03b6c2ba222738e4accd0b1ee5cdb3bfaae848 Mon Sep 17 00:00:00 2001 From: automation Date: Thu, 14 Nov 2024 08:01:50 +0000 Subject: [PATCH 059/179] [no-ci] updated by mvgplugin --- .../java/org/modelingvalue/dclare/Logic.java | 20 +++++++++++++++++++ .../modelingvalue/dclare/test/LogicTest.java | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 2c6cba41..9f970a38 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare; import java.util.function.BiPredicate; diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 3711c5a4..2180694b 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare.test; import static org.junit.jupiter.api.Assertions.assertEquals; From 20e1aba06b4ab965546daa15b8782bd4caeb53e8 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 14 Nov 2024 11:08:02 +0100 Subject: [PATCH 060/179] fixes --- .../org/modelingvalue/dclare/Constant.java | 4 ++ .../java/org/modelingvalue/dclare/Logic.java | 56 +++++++++---------- .../modelingvalue/dclare/test/LogicTest.java | 13 +++-- 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index 5b658b88..6e89e6d3 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -52,6 +52,10 @@ public static Constant of(Object id, V def, Function deriver, return new Constant<>(id, o -> def, null, null, deriver, null, modifiers); } + public static Constant of(Object id, V def, Function deriver, QuadConsumer changed, SetableModifier... modifiers) { + return new Constant<>(id, o -> def, null, null, deriver, changed, modifiers); + } + public static Constant of(Object id, Function deriver, QuadConsumer changed, SetableModifier... modifiers) { return new Constant<>(id, null, null, null, deriver, changed, modifiers); } diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 2c6cba41..0d14874d 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -21,42 +21,42 @@ private Logic() { private static final Context> VARIABLES = Context.of(List.of()); - public static abstract class ClauseType { + public static abstract class Functor { }; // Functions public static final Fun1 fun1(Object id, java.util.function.Function> f) { - return new Fun1(id, (o) -> f.apply(o).get()); + return new Fun1(id, null, (o) -> f.apply(o).get()); } - public static final Fun1 fun1(Object id) { - return new Fun1(id, (o) -> null); + public static final Fun1 fun1(Object id, T def) { + return new Fun1(id, def, null); } public static final Fun2 fun2(Object id, java.util.function.BiFunction> f) { - return new Fun2(id, (o1, o2) -> f.apply(o1, o2).get()); + return new Fun2(id, null, (o1, o2) -> f.apply(o1, o2).get()); } - public static final Fun2 fun2(Object id) { - return new Fun2(id, (o1, o2) -> null); + public static final Fun2 fun2(Object id, T def) { + return new Fun2(id, def, null); } public static final Fun3 function(Object id, org.modelingvalue.collections.util.TriFunction> f) { - return new Fun3(id, (o1, o2, o3) -> f.apply(o1, o2, o3).get()); + return new Fun3(id, null, (o1, o2, o3) -> f.apply(o1, o2, o3).get()); } - public static final Fun3 function(Object id) { - return new Fun3(id, (o1, o2, o3) -> null); + public static final Fun3 function(Object id, T def) { + return new Fun3(id, def, null); } - public static final class Fun1 extends ClauseType { + public static final class Fun1 extends Functor { private final Constant, T> constant; private final Setable, Set>> extend; - private Fun1(Object id, java.util.function.Function f) { + private Fun1(Object id, T def, java.util.function.Function f) { extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., T> of(id, o -> f.apply(o.a()), (tx, o, b, t) -> { + constant = Constant., T> of(id, def, f == null ? null : o -> f.apply(o.a()), (tx, o, b, t) -> { if (t != null) { extend.add(Single.of(null), o); } @@ -81,13 +81,13 @@ public String toString() { } } - public static final class Fun2 extends ClauseType { + public static final class Fun2 extends Functor { private final Constant, T> constant; private final Setable, Set>> extend; - private Fun2(Object id, java.util.function.BiFunction f) { + private Fun2(Object id, T def, java.util.function.BiFunction f) { extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., T> of(id, o -> f.apply(o.a(), o.b()), (tx, o, b, t) -> { + constant = Constant., T> of(id, def, f == null ? null : o -> f.apply(o.a(), o.b()), (tx, o, b, t) -> { if (t != null) { extend.add(Pair.of(null, null), o); extend.add(Pair.of(o.a(), null), o); @@ -114,13 +114,13 @@ public String toString() { } } - public static final class Fun3 extends ClauseType { + public static final class Fun3 extends Functor { private final Constant, T> constant; private final Setable, Set>> extend; - private Fun3(Object id, org.modelingvalue.collections.util.TriFunction f) { + private Fun3(Object id, T def, org.modelingvalue.collections.util.TriFunction f) { extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., T> of(id, o -> f.apply(o.a(), o.b(), o.c()), (tx, o, b, t) -> { + constant = Constant., T> of(id, def, f == null ? null : o -> f.apply(o.a(), o.b(), o.c()), (tx, o, b, t) -> { if (t != null) { extend.add(Triple.of(null, null, null), o); extend.add(Triple.of(o.a(), null, null), o); @@ -159,7 +159,7 @@ public static final Rel1 rel1(Object id, java.util.function.Function Rel1 rel1(Object id) { - return new Rel1(id, (o) -> false); + return new Rel1(id, null); } public static final Rel2 rel2(Object id, java.util.function.BiFunction p) { @@ -167,7 +167,7 @@ public static final Rel2 rel2(Object id, java.util.function.BiF } public static final Rel2 rel2(Object id) { - return new Rel2(id, (o1, o2) -> false); + return new Rel2(id, null); } public static final Rel3 rel3(Object id, org.modelingvalue.collections.util.TriFunction p) { @@ -175,16 +175,16 @@ public static final Rel3 rel3(Object id, org.modelingva } public static final Rel3 rel3(Object id) { - return new Rel3(id, (o1, o2, o3) -> false); + return new Rel3(id, null); } - public static final class Rel1 extends ClauseType { + public static final class Rel1 extends Functor { private final Constant, Boolean> constant; private final Setable, Set>> extend; private Rel1(Object id, Predicate p) { extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., Boolean> of(id, o -> p.test(o.a()), (tx, o, b, t) -> { + constant = Constant., Boolean> of(id, p != null ? null : false, p == null ? null : o -> p.test(o.a()), (tx, o, b, t) -> { if (t != null) { extend.add(Single.of(null), o); } @@ -211,13 +211,13 @@ public String toString() { } - public static final class Rel2 extends ClauseType { + public static final class Rel2 extends Functor { private final Constant, Boolean> constant; private final Setable, Set>> extend; private Rel2(Object id, BiPredicate p) { extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., Boolean> of(id, o -> p.test(o.a(), o.b()), (tx, o, b, t) -> { + constant = Constant., Boolean> of(id, p != null ? null : false, p == null ? null : o -> p.test(o.a(), o.b()), (tx, o, b, t) -> { if (t) { extend.add(Pair.of(null, null), o); extend.add(Pair.of(o.a(), null), o); @@ -245,13 +245,13 @@ public String toString() { } } - public static final class Rel3 extends ClauseType { + public static final class Rel3 extends Functor { private final Constant, Boolean> constant; private final Setable, Set>> extend; private Rel3(Object id, TriPredicate p) { extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., Boolean> of(id, o -> p.test(o.a(), o.b(), o.c()), (tx, o, b, t) -> { + constant = Constant., Boolean> of(id, p != null ? null : false, p == null ? null : o -> p.test(o.a(), o.b(), o.c()), (tx, o, b, t) -> { if (t) { extend.add(Triple.of(null, null, null), o); extend.add(Triple.of(o.a(), null, null), o); diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 3711c5a4..9f6b5d09 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -21,7 +21,7 @@ void run(Runnable test) { universeTransaction.waitForEnd(); } - static final Fun1> PARENTS = fun1("parent"); + static final Fun1> PARENTS = fun1("parent", Set.of()); static final Fun1> ANCESTORS = fun1("ancestor", // (p) -> sup(PARENTS.get(p).addAll(PARENTS.get(p).flatMap(LogicTest.ANCESTORS::get)))); @@ -35,7 +35,7 @@ void run(Runnable test) { static final Rel2 ANCESTOR2 = rel2("isAncestor", // (a, o) -> or(PARENT.sup(o, a), // - uni((String x) -> and(LogicTest.ANCESTOR1.sup(a, x), PARENT.sup(o, x))))); + uni((String x) -> and(LogicTest.ANCESTOR2.sup(a, x), PARENT.sup(o, x))))); @RepeatedTest(32) public void test1() { @@ -44,10 +44,13 @@ public void test1() { PARENTS.set("Wim", Set.of("Jan", "Elske")); PARENTS.set("Joppe", Set.of("Wim", "Heleen")); PARENTS.set("Marijn", Set.of("Wim", "Heleen")); - assertEquals(ANCESTORS.sup("Joppe"), Set.of("Wim", "Heleen", "Jan", "Elske", "Carel")); + assertEquals(ANCESTORS.get("Joppe"), Set.of("Wim", "Heleen", "Jan", "Elske", "Carel")); - assertTrue(ANCESTOR1.sup("Carel", "Marijn")); - assertTrue(ANCESTOR1.sup("Wim", "Marijn")); + assertTrue(ANCESTOR1.is("Carel", "Marijn")); + assertTrue(ANCESTOR1.is("Wim", "Marijn")); + + assertTrue(ANCESTOR2.is("Carel", "Marijn")); + assertTrue(ANCESTOR2.is("Wim", "Marijn")); }); } } From fb3726dc61184d0e240f35d17abc336717d01b4b Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 14 Nov 2024 14:57:22 +0100 Subject: [PATCH 061/179] Logic unification --- .../java/org/modelingvalue/dclare/Logic.java | 224 ++++++++++++++---- .../modelingvalue/dclare/test/LogicTest.java | 8 +- 2 files changed, 180 insertions(+), 52 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index dbc244da..66943b5d 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -1,23 +1,3 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus ~ -// ~ -// Contributors: ~ -// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ -// --------------------------------------------------------------------------------------------------------------------- ~ -// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ -// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ -// but also our friend. "He will live on in many of the lines of code you see below." ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - package org.modelingvalue.dclare; import java.util.function.BiPredicate; @@ -26,8 +6,11 @@ import java.util.function.Supplier; import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; +import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.struct.Struct; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.collections.util.Single; @@ -39,9 +22,52 @@ public final class Logic { private Logic() { } - private static final Context> VARIABLES = Context.of(List.of()); + private static final Context> VARIABLES = Context.of(Map.of()); public static abstract class Functor { + + protected final S bind(S in) { + Map vars = VARIABLES.get(); + Object[] array = in.toArray(); + Set empty = Set.of(); + for (int i = 0; i < in.length(); i++) { + Object vin = in.get(i); + if (vars.containsKey(vin)) { + Object vout = vars.get(vin); + array[i] = vout; + if (vout == null) { + empty = empty.add(vin); + } + } + } + S out = copy(array); + if (!empty.isEmpty()) { + Set extend = extend(out); + if (extend.isEmpty()) { + throw new NonDeterministicException(in, constant(), "No match found"); + } else { + Set em = empty; + throw new UnboundVariableException(empty, extend.map(s -> { + Map vs = vars; + for (int i = 0; i < in.length(); i++) { + Object vin = in.get(i); + if (em.contains(vin)) { + vs = vs.put(vin, s.get(i)); + } + } + return vs; + }).asSet()); + } + } + return out; + } + + protected abstract S copy(Object[] array); + + protected abstract Set extend(S s); + + @SuppressWarnings("rawtypes") + protected abstract Constant constant(); }; // Functions @@ -88,7 +114,7 @@ public Supplier sup(O o) { } public T get(O o) { - return constant.get(Single.of(o)); + return constant.get(bind(Single.of(o))); } public void set(O o, T t) { @@ -99,6 +125,24 @@ public void set(O o, T t) { public String toString() { return constant.toString(); } + + @SuppressWarnings("unchecked") + @Override + protected S copy(Object[] array) { + return (S) Single.of(array[0]); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + protected Set extend(S s) { + return extend.get((Single) s); + } + + @SuppressWarnings("rawtypes") + @Override + protected Constant constant() { + return constant; + } } public static final class Fun2 extends Functor { @@ -121,7 +165,7 @@ public Supplier sup(O1 o1, O2 o2) { } public T get(O1 o1, O2 o2) { - return constant.get(Pair.of(o1, o2)); + return constant.get(bind(Pair.of(o1, o2))); } public void set(O1 o1, O2 o2, T t) { @@ -132,6 +176,24 @@ public void set(O1 o1, O2 o2, T t) { public String toString() { return constant.toString(); } + + @SuppressWarnings("unchecked") + @Override + protected S copy(Object[] array) { + return (S) Pair.of(array[0], array[1]); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + protected Set extend(S s) { + return extend.get((Pair) s); + } + + @SuppressWarnings("rawtypes") + @Override + protected Constant constant() { + return constant; + } } public static final class Fun3 extends Functor { @@ -158,7 +220,7 @@ public Supplier sup(O1 o1, O2 o2, O3 o3) { } public T get(O1 o1, O2 o2, O3 o3) { - return constant.get(Triple.of(o1, o2, o3)); + return constant.get(bind(Triple.of(o1, o2, o3))); } public void set(O1 o1, O2 o2, O3 o3, T t) { @@ -170,6 +232,24 @@ public String toString() { return constant.toString(); } + @SuppressWarnings("unchecked") + @Override + protected S copy(Object[] array) { + return (S) Triple.of(array[0], array[1], array[2]); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + protected Set extend(S s) { + return extend.get((Triple) s); + } + + @SuppressWarnings("rawtypes") + @Override + protected Constant constant() { + return constant; + } + } // Relations @@ -217,7 +297,7 @@ public BooleanSupplier sup(O o) { } public boolean is(O o) { - return constant.get(Single.of(o)); + return constant.get(bind(Single.of(o))); } public void set(O o) { @@ -229,6 +309,24 @@ public String toString() { return constant.toString(); } + @SuppressWarnings("unchecked") + @Override + protected S copy(Object[] array) { + return (S) Single.of(array[0]); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + protected Set extend(S s) { + return extend.get((Single) s); + } + + @SuppressWarnings("rawtypes") + @Override + protected Constant constant() { + return constant; + } + } public static final class Rel2 extends Functor { @@ -252,7 +350,7 @@ public BooleanSupplier sup(O1 o1, O2 o2) { } public boolean is(O1 o1, O2 o2) { - return constant.get(Pair.of(o1, o2)); + return constant.get(bind(Pair.of(o1, o2))); } public void set(O1 o1, O2 o2) { @@ -263,6 +361,24 @@ public void set(O1 o1, O2 o2) { public String toString() { return constant.toString(); } + + @SuppressWarnings("unchecked") + @Override + protected S copy(Object[] array) { + return (S) Pair.of(array[0], array[1]); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + protected Set extend(S s) { + return extend.get((Pair) s); + } + + @SuppressWarnings("rawtypes") + @Override + protected Constant constant() { + return constant; + } } public static final class Rel3 extends Functor { @@ -290,7 +406,7 @@ public BooleanSupplier sup(O1 o1, O2 o2, O3 o3) { } public boolean is(O1 o1, O2 o2, O3 o3) { - return constant.get(Triple.of(o1, o2, o3)); + return constant.get(bind(Triple.of(o1, o2, o3))); } public void set(O1 o1, O2 o2, O3 o3) { @@ -301,6 +417,24 @@ public void set(O1 o1, O2 o2, O3 o3) { public String toString() { return constant.toString(); } + + @SuppressWarnings("unchecked") + @Override + protected S copy(Object[] array) { + return (S) Triple.of(array[0], array[1], array[2]); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + protected Set extend(S s) { + return extend.get((Triple) s); + } + + @SuppressWarnings("rawtypes") + @Override + protected Constant constant() { + return constant; + } } // Inv @@ -392,44 +526,38 @@ private static boolean and(List predicates) { // Unification private static final class UnboundVariableException extends RuntimeException { - private static final long serialVersionUID = 4505117271488648346L; + private static final long serialVersionUID = 4505117271488648346L; - private final Object var; - private final Set> vars; + private final Set vars; + private final Set> bindings; - private UnboundVariableException(Object var, Set> vars) { - this.var = var; + private UnboundVariableException(Set vars, Set> bindings) { this.vars = vars; + this.bindings = bindings; } } - private static final class Var { - } - @SuppressWarnings("unchecked") - public static final BooleanSupplier uni(java.util.function.Function predicate) { - List vars = List.of(new Var()); - return () -> uni(vars, v -> predicate.apply((V1) v.get(0)).getAsBoolean()); + public static final BooleanSupplier uni(V1 v1, BooleanSupplier predicate) { + return () -> doUni(Collection.of(v1).asMap(o -> Entry.of(o, null)), () -> predicate.getAsBoolean()); } @SuppressWarnings("unchecked") - public static final BooleanSupplier uni(java.util.function.BiFunction predicate) { - List vars = List.of(new Var(), new Var()); - return () -> uni(vars, v -> predicate.apply((V1) v.get(0), (V2) v.get(1)).getAsBoolean()); + public static final BooleanSupplier uni(V1 v1, V2 v2, BooleanSupplier predicate) { + return () -> doUni(Collection.of(v1, v2).asMap(o -> Entry.of(o, null)), () -> predicate.getAsBoolean()); } @SuppressWarnings("unchecked") - public static final BooleanSupplier uni(org.modelingvalue.collections.util.TriFunction predicate) { - List vars = List.of(new Var(), new Var(), new Var()); - return () -> uni(vars, v -> predicate.apply((V1) v.get(0), (V2) v.get(1), (V3) v.get(2)).getAsBoolean()); + public static final BooleanSupplier uni(V1 v1, V2 v2, V3 v3, BooleanSupplier predicate) { + return () -> doUni(Collection.of(v1, v2, v3).asMap(o -> Entry.of(o, null)), () -> predicate.getAsBoolean()); } - private static boolean uni(List vars, Predicate> predicate) { + private static boolean doUni(Map vars, Supplier predicate) { try { - return VARIABLES.get(vars, () -> predicate.test(vars)); + return VARIABLES.get(vars, predicate); } catch (UnboundVariableException uve) { - if (vars.contains(uve.var)) { - return any(uve.vars.map(vs -> () -> uni(vs, predicate))).getAsBoolean(); + if (uve.vars.anyMatch(vars::containsKey)) { + return any(uve.bindings.map(vs -> () -> doUni(vs, predicate))).getAsBoolean(); } else { throw uve; } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index f27b5fb7..4ea2f6ec 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -43,19 +43,19 @@ void run(Runnable test) { static final Fun1> PARENTS = fun1("parent", Set.of()); - static final Fun1> ANCESTORS = fun1("ancestor", // + static final Fun1> ANCESTORS = fun1("ancestors", // (p) -> sup(PARENTS.get(p).addAll(PARENTS.get(p).flatMap(LogicTest.ANCESTORS::get)))); static final Rel2 PARENT = rel2("parent", // (a, b) -> sup(PARENTS.get(a).contains(b))); - static final Rel2 ANCESTOR1 = rel2("isAncestor", // + static final Rel2 ANCESTOR1 = rel2("ancestor1", // (a, o) -> or(PARENT.sup(o, a), // any(PARENTS.get(o).map(p -> LogicTest.ANCESTOR1.sup(a, p))))); - static final Rel2 ANCESTOR2 = rel2("isAncestor", // + static final Rel2 ANCESTOR2 = rel2("ancestor2", // (a, o) -> or(PARENT.sup(o, a), // - uni((String x) -> and(LogicTest.ANCESTOR2.sup(a, x), PARENT.sup(o, x))))); + uni("X", and(LogicTest.ANCESTOR2.sup(a, "X"), PARENT.sup(o, "X"))))); @RepeatedTest(32) public void test1() { From 19dfce9925de7894db389ca85c27123560b84985 Mon Sep 17 00:00:00 2001 From: automation Date: Thu, 14 Nov 2024 13:58:24 +0000 Subject: [PATCH 062/179] [no-ci] updated by mvgplugin --- .../java/org/modelingvalue/dclare/Logic.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 66943b5d..aa8027b9 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare; import java.util.function.BiPredicate; From a7322c621a589d404d71235eafe776fb654e2283 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 14 Nov 2024 16:59:19 +0100 Subject: [PATCH 063/179] unification --- .../java/org/modelingvalue/dclare/Logic.java | 56 ++++--------------- .../dclare/ex/NonDeterministicException.java | 4 +- 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 66943b5d..2b33ac96 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -22,9 +22,10 @@ public final class Logic { private Logic() { } - private static final Context> VARIABLES = Context.of(Map.of()); + private static final Context> VARIABLES = Context.of(Map.of()); + private static final String NO_MATCH_FOUND = "No match found"; - public static abstract class Functor { + public static abstract class Functor implements Feature { protected final S bind(S in) { Map vars = VARIABLES.get(); @@ -44,7 +45,7 @@ protected final S bind(S in) { if (!empty.isEmpty()) { Set extend = extend(out); if (extend.isEmpty()) { - throw new NonDeterministicException(in, constant(), "No match found"); + throw new NonDeterministicException(in, this, NO_MATCH_FOUND); } else { Set em = empty; throw new UnboundVariableException(empty, extend.map(s -> { @@ -65,9 +66,6 @@ protected final S bind(S in) { protected abstract S copy(Object[] array); protected abstract Set extend(S s); - - @SuppressWarnings("rawtypes") - protected abstract Constant constant(); }; // Functions @@ -137,12 +135,6 @@ protected S copy(Object[] array) { protected Set extend(S s) { return extend.get((Single) s); } - - @SuppressWarnings("rawtypes") - @Override - protected Constant constant() { - return constant; - } } public static final class Fun2 extends Functor { @@ -188,12 +180,6 @@ protected S copy(Object[] array) { protected Set extend(S s) { return extend.get((Pair) s); } - - @SuppressWarnings("rawtypes") - @Override - protected Constant constant() { - return constant; - } } public static final class Fun3 extends Functor { @@ -243,13 +229,6 @@ protected S copy(Object[] array) { protected Set extend(S s) { return extend.get((Triple) s); } - - @SuppressWarnings("rawtypes") - @Override - protected Constant constant() { - return constant; - } - } // Relations @@ -320,13 +299,6 @@ protected S copy(Object[] array) { protected Set extend(S s) { return extend.get((Single) s); } - - @SuppressWarnings("rawtypes") - @Override - protected Constant constant() { - return constant; - } - } public static final class Rel2 extends Functor { @@ -373,12 +345,6 @@ protected S copy(Object[] array) { protected Set extend(S s) { return extend.get((Pair) s); } - - @SuppressWarnings("rawtypes") - @Override - protected Constant constant() { - return constant; - } } public static final class Rel3 extends Functor { @@ -429,12 +395,6 @@ protected S copy(Object[] array) { protected Set extend(S s) { return extend.get((Triple) s); } - - @SuppressWarnings("rawtypes") - @Override - protected Constant constant() { - return constant; - } } // Inv @@ -476,7 +436,9 @@ private static boolean or(List predicates) { try { return p.getAsBoolean(); } catch (NonDeterministicException nde) { - rte[0] = nde; + if (!(nde.getFeature() instanceof Functor)) { + rte[0] = nde; + } return false; } }); @@ -511,7 +473,9 @@ private static boolean and(List predicates) { try { return p.getAsBoolean(); } catch (NonDeterministicException nde) { - rte[0] = nde; + if (!(nde.getFeature() instanceof Functor)) { + rte[0] = nde; + } return true; } }); diff --git a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java index 7f91eab1..640cd8e1 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java @@ -20,12 +20,12 @@ package org.modelingvalue.dclare.ex; -import org.modelingvalue.dclare.Setable; +import org.modelingvalue.dclare.Feature; public final class NonDeterministicException extends ConsistencyError { private static final long serialVersionUID = 7857822332170335179L; - public NonDeterministicException(Object object, Setable feature, String message) { + public NonDeterministicException(Object object, Feature feature, String message) { super(object, feature, 10, message); } From 782c1c6bbea430591c0dc0309a11770c88dd6aa1 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sat, 16 Nov 2024 15:36:59 +0100 Subject: [PATCH 064/179] better logic --- .../org/modelingvalue/dclare/Constant.java | 8 +- .../modelingvalue/dclare/ConstantState.java | 12 +- .../java/org/modelingvalue/dclare/Logic.java | 468 +++++++----------- .../modelingvalue/dclare/test/LogicTest.java | 53 +- 4 files changed, 220 insertions(+), 321 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index 6e89e6d3..31ef100e 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -94,7 +94,13 @@ public boolean isDurable() { public T set(O object, BiFunction function, E element) { LeafTransaction leafTransaction = currentLeaf(object); ConstantState constants = leafTransaction.constantState(); - return constants.set(leafTransaction, object, this, function, element); + return constants.set(leafTransaction, object, this, function, element, false); + } + + public T force(O object, BiFunction function, E element) { + LeafTransaction leafTransaction = currentLeaf(object); + ConstantState constants = leafTransaction.constantState(); + return constants.set(leafTransaction, object, this, function, element, true); } @Override diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index daee74c8..ea9e9cca 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -194,12 +194,12 @@ public V set(ILeafTransaction cch, O object, Constant constant, V soll } @SuppressWarnings("unchecked") - public V set(ILeafTransaction cch, O object, Constant constant, BiFunction function, E element) { + public V set(ILeafTransaction cch, O object, Constant constant, BiFunction function, E element, boolean forced) { Map, Object> prev = constants; V ist = (V) prev.get(constant); - V soll = function.apply(ist, element); - if (ist == null) { - ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, false); + V soll = function.apply(ist == null ? constant.getDefault(object) : ist == NULL ? null : ist, element); + if (ist == null || forced) { + ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, forced); } if (!Objects.equals(ist == NULL ? null : ist, soll)) { throw new NonDeterministicException(object, constant, "Constant is not consistent " + StringUtil.toString(object) + "." + constant + "=" + StringUtil.toString(ist) + "!=" + StringUtil.toString(soll)); @@ -328,8 +328,8 @@ public V set(ILeafTransaction cch, O object, Constant constant, V v return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, value, forced); } - public V set(ILeafTransaction cch, O object, Constant constant, BiFunction deriver, E element) { - return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, deriver, element); + public V set(ILeafTransaction cch, O object, Constant constant, BiFunction deriver, E element, boolean forced) { + return getConstants(cch, object, referenceType(constant)).set(cch, object, constant, deriver, element, forced); } private ReferenceType referenceType(Constant constant) { diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 7090db66..c696b450 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -22,6 +22,7 @@ import java.util.function.BiPredicate; import java.util.function.BooleanSupplier; +import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; @@ -33,227 +34,119 @@ import org.modelingvalue.collections.struct.Struct; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; +import org.modelingvalue.collections.util.QuadPredicate; +import org.modelingvalue.collections.util.Quadruple; import org.modelingvalue.collections.util.Single; import org.modelingvalue.collections.util.TriPredicate; import org.modelingvalue.collections.util.Triple; -import org.modelingvalue.dclare.ex.NonDeterministicException; public final class Logic { private Logic() { } - private static final Context> VARIABLES = Context.of(Map.of()); - private static final String NO_MATCH_FOUND = "No match found"; + @SuppressWarnings("rawtypes") + private static final Context>> DERIVED = Context.of(List.of()); - public static abstract class Functor implements Feature { + private static final class CircularLogicException extends RuntimeException { + private static final long serialVersionUID = 293433487448006753L; - protected final S bind(S in) { - Map vars = VARIABLES.get(); - Object[] array = in.toArray(); - Set empty = Set.of(); - for (int i = 0; i < in.length(); i++) { - Object vin = in.get(i); - if (vars.containsKey(vin)) { - Object vout = vars.get(vin); - array[i] = vout; - if (vout == null) { - empty = empty.add(vin); - } - } - } - S out = copy(array); - if (!empty.isEmpty()) { - Set extend = extend(out); - if (extend.isEmpty()) { - throw new NonDeterministicException(in, this, NO_MATCH_FOUND); - } else { - Set em = empty; - throw new UnboundVariableException(empty, extend.map(s -> { - Map vs = vars; - for (int i = 0; i < in.length(); i++) { - Object vin = in.get(i); - if (em.contains(vin)) { - vs = vs.put(vin, s.get(i)); - } - } - return vs; - }).asSet()); - } - } - return out; - } - - protected abstract S copy(Object[] array); - - protected abstract Set extend(S s); - }; - - // Functions - - public static final Fun1 fun1(Object id, java.util.function.Function> f) { - return new Fun1(id, null, (o) -> f.apply(o).get()); - } - - public static final Fun1 fun1(Object id, T def) { - return new Fun1(id, def, null); - } - - public static final Fun2 fun2(Object id, java.util.function.BiFunction> f) { - return new Fun2(id, null, (o1, o2) -> f.apply(o1, o2).get()); - } - - public static final Fun2 fun2(Object id, T def) { - return new Fun2(id, def, null); - } - - public static final Fun3 function(Object id, org.modelingvalue.collections.util.TriFunction> f) { - return new Fun3(id, null, (o1, o2, o3) -> f.apply(o1, o2, o3).get()); - } - - public static final Fun3 function(Object id, T def) { - return new Fun3(id, def, null); - } + @SuppressWarnings("rawtypes") + private final List> derived; - public static final class Fun1 extends Functor { - private final Constant, T> constant; - private final Setable, Set>> extend; - - private Fun1(Object id, T def, java.util.function.Function f) { - extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., T> of(id, def, f == null ? null : o -> f.apply(o.a()), (tx, o, b, t) -> { - if (t != null) { - extend.add(Single.of(null), o); - } - }); - } - - public Supplier sup(O o) { - return () -> get(o); - } - - public T get(O o) { - return constant.get(bind(Single.of(o))); - } - - public void set(O o, T t) { - constant.force(Single.of(o), t); + @SuppressWarnings("rawtypes") + private CircularLogicException(List> derived, Pair current) { + int i = derived.firstIndexOf(current); + this.derived = derived.sublist(0, i + 1).prepend(current); } @Override - public String toString() { - return constant.toString(); - } - - @SuppressWarnings("unchecked") - @Override - protected S copy(Object[] array) { - return (S) Single.of(array[0]); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - protected Set extend(S s) { - return extend.get((Single) s); + public String getMessage() { + return "Cycle " + derived.reverse().asList().toString().substring(4); } } - public static final class Fun2 extends Functor { - private final Constant, T> constant; - private final Setable, Set>> extend; - - private Fun2(Object id, T def, java.util.function.BiFunction f) { - extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., T> of(id, def, f == null ? null : o -> f.apply(o.a(), o.b()), (tx, o, b, t) -> { - if (t != null) { - extend.add(Pair.of(null, null), o); - extend.add(Pair.of(o.a(), null), o); - extend.add(Pair.of(null, o.b()), o); - } - }); - } - - public Supplier sup(O1 o1, O2 o2) { - return () -> get(o1, o2); - } - - public T get(O1 o1, O2 o2) { - return constant.get(bind(Pair.of(o1, o2))); - } + public static abstract class Functor { + private final Constant> extend; - public void set(O1 o1, O2 o2, T t) { - constant.force(Pair.of(o1, o2), t); + protected Functor(Object id) { + extend = Constant.> of(Single.of(id), Set.of(), CoreSetableModifier.durable); } - @Override - public String toString() { - return constant.toString(); - } - - @SuppressWarnings("unchecked") - @Override - protected S copy(Object[] array) { - return (S) Pair.of(array[0], array[1]); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - protected Set extend(S s) { - return extend.get((Pair) s); - } - } - - public static final class Fun3 extends Functor { - private final Constant, T> constant; - private final Setable, Set>> extend; - - private Fun3(Object id, T def, org.modelingvalue.collections.util.TriFunction f) { - extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., T> of(id, def, f == null ? null : o -> f.apply(o.a(), o.b(), o.c()), (tx, o, b, t) -> { - if (t != null) { - extend.add(Triple.of(null, null, null), o); - extend.add(Triple.of(o.a(), null, null), o); - extend.add(Triple.of(null, o.b(), null), o); - extend.add(Triple.of(null, null, o.c()), o); - extend.add(Triple.of(o.a(), o.b(), null), o); - extend.add(Triple.of(o.a(), null, o.c()), o); - extend.add(Triple.of(null, o.b(), o.c()), o); + @SuppressWarnings("rawtypes") + protected final Function derive(Function f) { + return o -> { + Pair slot = Pair.of(this, o); + List> pre = DERIVED.get(); + if (pre.contains(slot)) { + throw new CircularLogicException(pre, slot); + } else { + return DERIVED.get(pre.prepend(slot), () -> f.apply(o)); } - }); + }; } - public Supplier sup(O1 o1, O2 o2, O3 o3) { - return () -> get(o1, o2, o3); - } - - public T get(O1 o1, O2 o2, O3 o3) { - return constant.get(bind(Triple.of(o1, o2, o3))); - } - - public void set(O1 o1, O2 o2, O3 o3, T t) { - constant.force(Triple.of(o1, o2, o3), t); + protected final S bind(S in) { + Map vars = VARIABLES.get(); + if (!vars.isEmpty()) { + Object[] array = in.toArray(); + Set empty = Set.of(); + for (int i = 0; i < in.length(); i++) { + Object vin = in.get(i); + if (vars.containsKey(vin)) { + Object vout = vars.get(vin); + array[i] = vout; + if (vout == null) { + empty = empty.add(vin); + } + } + } + if (!empty.isEmpty()) { + Set set = extend.get(copy(array)); + if (!set.isEmpty()) { + Set em = empty; + throw new UnboundVariableException(empty, set.map(s -> { + Map vs = vars; + for (int i = 0; i < in.length(); i++) { + Object vin = in.get(i); + if (em.contains(vin)) { + vs = vs.put(vin, s.get(i)); + } + } + return vs; + }).asSet()); + } + } + } + return in; } - @Override - public String toString() { - return constant.toString(); + protected final void extend(S in) { + extend(0, in, in.toArray()); } - @SuppressWarnings("unchecked") - @Override - protected S copy(Object[] array) { - return (S) Triple.of(array[0], array[1], array[2]); + private void extend(int i, S in, Object[] array) { + if (i < array.length) { + array = array.clone(); + if (array[i] == null) { + array[i] = in.get(i); + extend.force(copy(array), Set::add, in); + } + extend(i + 1, in, array); + if (array[i] != null) { + array[i] = null; + extend.force(copy(array), Set::add, in); + } + extend(i + 1, in, array); + } } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - protected Set extend(S s) { - return extend.get((Triple) s); - } - } + protected abstract S copy(Object[] array); + }; // Relations - public static final Rel1 rel1(Object id, java.util.function.Function p) { + public static final Rel1 rel1(Object id, // + java.util.function.Function p) { return new Rel1(id, (o) -> p.apply(o).getAsBoolean()); } @@ -261,7 +154,8 @@ public static final Rel1 rel1(Object id) { return new Rel1(id, null); } - public static final Rel2 rel2(Object id, java.util.function.BiFunction p) { + public static final Rel2 rel2(Object id, // + java.util.function.BiFunction p) { return new Rel2(id, (o1, o2) -> p.apply(o1, o2).getAsBoolean()); } @@ -269,7 +163,8 @@ public static final Rel2 rel2(Object id) { return new Rel2(id, null); } - public static final Rel3 rel3(Object id, org.modelingvalue.collections.util.TriFunction p) { + public static final Rel3 rel3(Object id, // + org.modelingvalue.collections.util.TriFunction p) { return new Rel3(id, (o1, o2, o3) -> p.apply(o1, o2, o3).getAsBoolean()); } @@ -277,30 +172,32 @@ public static final Rel3 rel3(Object id) { return new Rel3(id, null); } - public static final class Rel1 extends Functor { - private final Constant, Boolean> constant; - private final Setable, Set>> extend; + public static final Rel4 rel4(Object id, // + org.modelingvalue.collections.util.QuadFunction p) { + return new Rel4(id, (o1, o2, o3, o4) -> p.apply(o1, o2, o3, o4).getAsBoolean()); + } + + public static final Rel4 rel4(Object id) { + return new Rel4(id, null); + } + + public static final class Rel1 extends Functor> { + private final Constant, Boolean> constant; private Rel1(Object id, Predicate p) { - extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., Boolean> of(id, p != null ? null : false, p == null ? null : o -> p.test(o.a()), (tx, o, b, t) -> { - if (t != null) { - extend.add(Single.of(null), o); - } - }); + super(id); + constant = Constant., Boolean> of(id, p != null ? null : false, // + p == null ? null : derive(o -> p.test(o.a())), // + (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") - public BooleanSupplier sup(O o) { - return () -> is(o); + public BooleanSupplier is(O o) { + return () -> constant.get(bind(Single.of(o))); } - public boolean is(O o) { - return constant.get(bind(Single.of(o))); - } - - public void set(O o) { - constant.force(Single.of(o), true); + public void fact(O o) { + constant.set(Single.of(o), true); } @Override @@ -310,43 +207,28 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected S copy(Object[] array) { - return (S) Single.of(array[0]); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - protected Set extend(S s) { - return extend.get((Single) s); + protected Single copy(Object[] array) { + return Single.of((O) array[0]); } } - public static final class Rel2 extends Functor { - private final Constant, Boolean> constant; - private final Setable, Set>> extend; + public static final class Rel2 extends Functor> { + private final Constant, Boolean> constant; private Rel2(Object id, BiPredicate p) { - extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., Boolean> of(id, p != null ? null : false, p == null ? null : o -> p.test(o.a(), o.b()), (tx, o, b, t) -> { - if (t) { - extend.add(Pair.of(null, null), o); - extend.add(Pair.of(o.a(), null), o); - extend.add(Pair.of(null, o.b()), o); - } - }); + super(id); + constant = Constant., Boolean> of(id, p != null ? null : false, // + p == null ? null : derive(o -> p.test(o.a(), o.b())), // + (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") - public BooleanSupplier sup(O1 o1, O2 o2) { - return () -> is(o1, o2); - } - - public boolean is(O1 o1, O2 o2) { - return constant.get(bind(Pair.of(o1, o2))); + public BooleanSupplier is(O1 o1, O2 o2) { + return () -> constant.get(bind(Pair.of(o1, o2))); } - public void set(O1 o1, O2 o2) { - constant.force(Pair.of(o1, o2), true); + public void fact(O1 o1, O2 o2) { + constant.set(Pair.of(o1, o2), true); } @Override @@ -356,47 +238,28 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected S copy(Object[] array) { - return (S) Pair.of(array[0], array[1]); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - protected Set extend(S s) { - return extend.get((Pair) s); + protected Pair copy(Object[] array) { + return Pair.of((O1) array[0], (O2) array[1]); } } - public static final class Rel3 extends Functor { - private final Constant, Boolean> constant; - private final Setable, Set>> extend; + public static final class Rel3 extends Functor> { + private final Constant, Boolean> constant; private Rel3(Object id, TriPredicate p) { - extend = Setable., Set>> of(Single.of(id), Set.of()); - constant = Constant., Boolean> of(id, p != null ? null : false, p == null ? null : o -> p.test(o.a(), o.b(), o.c()), (tx, o, b, t) -> { - if (t) { - extend.add(Triple.of(null, null, null), o); - extend.add(Triple.of(o.a(), null, null), o); - extend.add(Triple.of(null, o.b(), null), o); - extend.add(Triple.of(null, null, o.c()), o); - extend.add(Triple.of(o.a(), o.b(), null), o); - extend.add(Triple.of(o.a(), null, o.c()), o); - extend.add(Triple.of(null, o.b(), o.c()), o); - } - }); + super(id); + constant = Constant., Boolean> of(id, p != null ? null : false, // + p == null ? null : derive(o -> p.test(o.a(), o.b(), o.c())), // + (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") - public BooleanSupplier sup(O1 o1, O2 o2, O3 o3) { - return () -> is(o1, o2, o3); - } - - public boolean is(O1 o1, O2 o2, O3 o3) { - return constant.get(bind(Triple.of(o1, o2, o3))); + public BooleanSupplier is(O1 o1, O2 o2, O3 o3) { + return () -> constant.get(bind(Triple.of(o1, o2, o3))); } - public void set(O1 o1, O2 o2, O3 o3) { - constant.force(Triple.of(o1, o2, o3), true); + public void fact(O1 o1, O2 o2, O3 o3) { + constant.set(Triple.of(o1, o2, o3), true); } @Override @@ -406,25 +269,40 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected S copy(Object[] array) { - return (S) Triple.of(array[0], array[1], array[2]); + protected Triple copy(Object[] array) { + return Triple.of((O1) array[0], (O2) array[1], (O3) array[2]); } + } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - protected Set extend(S s) { - return extend.get((Triple) s); + public static final class Rel4 extends Functor> { + private final Constant, Boolean> constant; + + private Rel4(Object id, QuadPredicate p) { + super(id); + constant = Constant., Boolean> of(id, p != null ? null : false, // + p == null ? null : derive(o -> p.test(o.a(), o.b(), o.c(), o.d())), // + (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); } - } - // Inv + @SuppressWarnings("unchecked") + public BooleanSupplier is(O1 o1, O2 o2, O3 o3, O4 o4) { + return () -> constant.get(bind(Quadruple.of(o1, o2, o3, o4))); + } - public static final BooleanSupplier sup(boolean b) { - return () -> b; - } + public void fact(O1 o1, O2 o2, O3 o3, O4 o4) { + constant.set(Quadruple.of(o1, o2, o3, o4), true); + } + + @Override + public String toString() { + return constant.toString(); + } - public static final Supplier sup(T t) { - return () -> t; + @SuppressWarnings("unchecked") + @Override + protected Quadruple copy(Object[] array) { + return Quadruple.of((O1) array[0], (O2) array[1], (O3) array[2], (O4) array[3]); + } } // Not @@ -451,18 +329,21 @@ private static boolean or(List predicates) { return predicates.first().getAsBoolean(); } else { List or = predicates.random().asList(); - RuntimeException[] rte = new RuntimeException[1]; + RuntimeException[] rte = new RuntimeException[2]; boolean result = or.anyMatch(p -> { try { return p.getAsBoolean(); - } catch (NonDeterministicException nde) { - if (!(nde.getFeature() instanceof Functor)) { - rte[0] = nde; - } + } catch (CircularLogicException cle) { + rte[0] = cle; return false; + } catch (UnboundVariableException uve) { + rte[1] = uve; + return true; } }); - if (!result && rte[0] != null) { + if (rte[1] != null) { + throw rte[1]; + } else if (!result && rte[0] != null) { throw rte[0]; } else { return result; @@ -488,18 +369,21 @@ private static boolean and(List predicates) { return predicates.first().getAsBoolean(); } else { List and = predicates.random().asList(); - RuntimeException[] rte = new RuntimeException[1]; + RuntimeException[] rte = new RuntimeException[2]; boolean result = and.anyMatch(p -> { try { return p.getAsBoolean(); - } catch (NonDeterministicException nde) { - if (!(nde.getFeature() instanceof Functor)) { - rte[0] = nde; - } + } catch (CircularLogicException cle) { + rte[0] = cle; return true; + } catch (UnboundVariableException uve) { + rte[1] = uve; + return false; } }); - if (result && rte[0] != null) { + if (rte[1] != null) { + throw rte[1]; + } else if (result && rte[0] != null) { throw rte[0]; } else { return result; @@ -509,6 +393,8 @@ private static boolean and(List predicates) { // Unification + private static final Context> VARIABLES = Context.of(Map.of()); + private static final class UnboundVariableException extends RuntimeException { private static final long serialVersionUID = 4505117271488648346L; diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 4ea2f6ec..6f9bfe6b 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -20,14 +20,13 @@ package org.modelingvalue.dclare.test; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; +import java.util.function.BooleanSupplier; + import org.junit.jupiter.api.RepeatedTest; -import org.modelingvalue.collections.Set; -import org.modelingvalue.dclare.Logic.Fun1; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -41,36 +40,44 @@ void run(Runnable test) { universeTransaction.waitForEnd(); } - static final Fun1> PARENTS = fun1("parent", Set.of()); + static void isTrue(BooleanSupplier bs) { + assertTrue(bs.getAsBoolean()); + } - static final Fun1> ANCESTORS = fun1("ancestors", // - (p) -> sup(PARENTS.get(p).addAll(PARENTS.get(p).flatMap(LogicTest.ANCESTORS::get)))); + static void isFalse(BooleanSupplier bs) { + assertTrue(!bs.getAsBoolean()); + } - static final Rel2 PARENT = rel2("parent", // - (a, b) -> sup(PARENTS.get(a).contains(b))); + static final String X = "$X"; - static final Rel2 ANCESTOR1 = rel2("ancestor1", // - (a, o) -> or(PARENT.sup(o, a), // - any(PARENTS.get(o).map(p -> LogicTest.ANCESTOR1.sup(a, p))))); + static final Rel2 PARENT = rel2("parent"); - static final Rel2 ANCESTOR2 = rel2("ancestor2", // - (a, o) -> or(PARENT.sup(o, a), // - uni("X", and(LogicTest.ANCESTOR2.sup(a, "X"), PARENT.sup(o, "X"))))); + static final Rel2 ANCESTOR = rel2("ancestor", // + (a, o) -> or(PARENT.is(a, o), // + uni(X, and(LogicTest.ANCESTOR.is(a, X), PARENT.is(X, o))))); @RepeatedTest(32) public void test1() { run(() -> { - PARENTS.set("Jan", Set.of("Carel")); - PARENTS.set("Wim", Set.of("Jan", "Elske")); - PARENTS.set("Joppe", Set.of("Wim", "Heleen")); - PARENTS.set("Marijn", Set.of("Wim", "Heleen")); - assertEquals(ANCESTORS.get("Joppe"), Set.of("Wim", "Heleen", "Jan", "Elske", "Carel")); + PARENT.fact("Carel", "Jan"); + PARENT.fact("Jan", "Wim"); + PARENT.fact("Elske", "Wim"); + PARENT.fact("Wim", "Joppe"); + PARENT.fact("Heleen", "Joppe"); + PARENT.fact("Wim", "Marijn"); + PARENT.fact("Heleeen", "Marijn"); + + isTrue(PARENT.is("Heleen", "Joppe")); + isTrue(PARENT.is("Jan", "Wim")); + + isFalse(PARENT.is("Marijn", "Wim")); + isFalse(PARENT.is("Heleeen", "Wim")); - assertTrue(ANCESTOR1.is("Carel", "Marijn")); - assertTrue(ANCESTOR1.is("Wim", "Marijn")); + isTrue(ANCESTOR.is("Carel", "Marijn")); + isTrue(ANCESTOR.is("Wim", "Marijn")); - assertTrue(ANCESTOR2.is("Carel", "Marijn")); - assertTrue(ANCESTOR2.is("Wim", "Marijn")); + isFalse(ANCESTOR.is("Marijn", "Wim")); + isFalse(ANCESTOR.is("Heleeen", "Wim")); }); } } From a1be7f913b45385ad108c6ae7a8823a1f5fb10e1 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sat, 16 Nov 2024 15:43:41 +0100 Subject: [PATCH 065/179] explicit exception handling --- src/test/java/org/modelingvalue/dclare/test/LogicTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 6f9bfe6b..106212e0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -26,7 +26,6 @@ import java.util.function.BooleanSupplier; -import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -56,7 +55,7 @@ static void isFalse(BooleanSupplier bs) { (a, o) -> or(PARENT.is(a, o), // uni(X, and(LogicTest.ANCESTOR.is(a, X), PARENT.is(X, o))))); - @RepeatedTest(32) + // @RepeatedTest(32) public void test1() { run(() -> { PARENT.fact("Carel", "Jan"); @@ -78,6 +77,7 @@ public void test1() { isFalse(ANCESTOR.is("Marijn", "Wim")); isFalse(ANCESTOR.is("Heleeen", "Wim")); + isFalse(ANCESTOR.is("Joppe", "Carel")); }); } } From d571c9bea9aaf86310014c3f67c3380d906c5a8a Mon Sep 17 00:00:00 2001 From: WimBast Date: Sat, 16 Nov 2024 20:06:04 +0100 Subject: [PATCH 066/179] first successful test of logic --- .../java/org/modelingvalue/dclare/Logic.java | 70 +++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 3 +- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index c696b450..fba5c33b 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -20,6 +20,7 @@ package org.modelingvalue.dclare; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiPredicate; import java.util.function.BooleanSupplier; import java.util.function.Function; @@ -47,7 +48,7 @@ private Logic() { @SuppressWarnings("rawtypes") private static final Context>> DERIVED = Context.of(List.of()); - private static final class CircularLogicException extends RuntimeException { + public static final class CircularLogicException extends RuntimeException { private static final long serialVersionUID = 293433487448006753L; @SuppressWarnings("rawtypes") @@ -88,20 +89,23 @@ protected final Function derive(Function f) { protected final S bind(S in) { Map vars = VARIABLES.get(); if (!vars.isEmpty()) { - Object[] array = in.toArray(); + Object[] pat = in.toArray(); + Object[] out = in.toArray(); Set empty = Set.of(); for (int i = 0; i < in.length(); i++) { Object vin = in.get(i); if (vars.containsKey(vin)) { Object vout = vars.get(vin); - array[i] = vout; if (vout == null) { + pat[i] = null; empty = empty.add(vin); + } else { + out[i] = vout; } } } if (!empty.isEmpty()) { - Set set = extend.get(copy(array)); + Set set = extend.get(copy(pat)); if (!set.isEmpty()) { Set em = empty; throw new UnboundVariableException(empty, set.map(s -> { @@ -116,12 +120,16 @@ protected final S bind(S in) { }).asSet()); } } + return copy(out); } return in; } - protected final void extend(S in) { - extend(0, in, in.toArray()); + @SuppressWarnings("rawtypes") + protected final void extend(S in, Boolean res, boolean der) { + if (res && !der) { + extend(0, in, in.toArray()); + } } private void extend(int i, S in, Object[] array) { @@ -188,7 +196,7 @@ private Rel1(Object id, Predicate p) { super(id); constant = Constant., Boolean> of(id, p != null ? null : false, // p == null ? null : derive(o -> p.test(o.a())), // - (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); + (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") @@ -219,7 +227,7 @@ private Rel2(Object id, BiPredicate p) { super(id); constant = Constant., Boolean> of(id, p != null ? null : false, // p == null ? null : derive(o -> p.test(o.a(), o.b())), // - (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); + (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") @@ -250,7 +258,7 @@ private Rel3(Object id, TriPredicate p) { super(id); constant = Constant., Boolean> of(id, p != null ? null : false, // p == null ? null : derive(o -> p.test(o.a(), o.b(), o.c())), // - (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); + (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") @@ -281,7 +289,7 @@ private Rel4(Object id, QuadPredicate p) { super(id); constant = Constant., Boolean> of(id, p != null ? null : false, // p == null ? null : derive(o -> p.test(o.a(), o.b(), o.c(), o.d())), // - (tx, o, b, t) -> extend(o), CoreSetableModifier.durable); + (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); } @SuppressWarnings("unchecked") @@ -329,22 +337,23 @@ private static boolean or(List predicates) { return predicates.first().getAsBoolean(); } else { List or = predicates.random().asList(); - RuntimeException[] rte = new RuntimeException[2]; + AtomicReference ref = new AtomicReference<>(null); boolean result = or.anyMatch(p -> { try { return p.getAsBoolean(); - } catch (CircularLogicException cle) { - rte[0] = cle; - return false; } catch (UnboundVariableException uve) { - rte[1] = uve; + ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); return true; + } catch (CircularLogicException cle) { + ref.updateAndGet(rte -> rte == null ? cle : rte); + return false; } }); - if (rte[1] != null) { - throw rte[1]; - } else if (!result && rte[0] != null) { - throw rte[0]; + RuntimeException exc = ref.get(); + if (exc instanceof UnboundVariableException) { + throw exc; + } else if (!result && exc != null) { + throw exc; } else { return result; } @@ -369,22 +378,23 @@ private static boolean and(List predicates) { return predicates.first().getAsBoolean(); } else { List and = predicates.random().asList(); - RuntimeException[] rte = new RuntimeException[2]; - boolean result = and.anyMatch(p -> { + AtomicReference ref = new AtomicReference<>(null); + boolean result = and.allMatch(p -> { try { return p.getAsBoolean(); - } catch (CircularLogicException cle) { - rte[0] = cle; - return true; } catch (UnboundVariableException uve) { - rte[1] = uve; + ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); return false; + } catch (CircularLogicException cle) { + ref.updateAndGet(rte -> rte == null ? cle : rte); + return true; } }); - if (rte[1] != null) { - throw rte[1]; - } else if (result && rte[0] != null) { - throw rte[0]; + RuntimeException exc = ref.get(); + if (exc instanceof UnboundVariableException) { + throw exc; + } else if (result && exc != null) { + throw exc; } else { return result; } @@ -395,7 +405,7 @@ private static boolean and(List predicates) { private static final Context> VARIABLES = Context.of(Map.of()); - private static final class UnboundVariableException extends RuntimeException { + public static final class UnboundVariableException extends RuntimeException { private static final long serialVersionUID = 4505117271488648346L; private final Set vars; diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 106212e0..5632baa1 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -26,6 +26,7 @@ import java.util.function.BooleanSupplier; +import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -55,7 +56,7 @@ static void isFalse(BooleanSupplier bs) { (a, o) -> or(PARENT.is(a, o), // uni(X, and(LogicTest.ANCESTOR.is(a, X), PARENT.is(X, o))))); - // @RepeatedTest(32) + @RepeatedTest(512) public void test1() { run(() -> { PARENT.fact("Carel", "Jan"); From 54b882998c39d2806a8addb5dea60de7dd91101f Mon Sep 17 00:00:00 2001 From: WimBast Date: Sat, 16 Nov 2024 20:31:39 +0100 Subject: [PATCH 067/179] performance --- .../java/org/modelingvalue/dclare/Logic.java | 54 +++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 2 + 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index fba5c33b..ce48c8d6 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -53,16 +53,21 @@ public static final class CircularLogicException extends RuntimeException { @SuppressWarnings("rawtypes") private final List> derived; + @SuppressWarnings("rawtypes") + private final Pair current; @SuppressWarnings("rawtypes") private CircularLogicException(List> derived, Pair current) { - int i = derived.firstIndexOf(current); - this.derived = derived.sublist(0, i + 1).prepend(current); + this.derived = derived; + this.current = current; } + @SuppressWarnings("rawtypes") @Override public String getMessage() { - return "Cycle " + derived.reverse().asList().toString().substring(4); + int i = derived.firstIndexOf(current); + List> cycle = derived.sublist(0, i + 1).prepend(current); + return "Cycle " + cycle.reverse().asList().toString().substring(4); } } @@ -107,17 +112,7 @@ protected final S bind(S in) { if (!empty.isEmpty()) { Set set = extend.get(copy(pat)); if (!set.isEmpty()) { - Set em = empty; - throw new UnboundVariableException(empty, set.map(s -> { - Map vs = vars; - for (int i = 0; i < in.length(); i++) { - Object vin = in.get(i); - if (em.contains(vin)) { - vs = vs.put(vin, s.get(i)); - } - } - return vs; - }).asSet()); + throw new UnboundVariableException(empty, set, in); } } return copy(out); @@ -406,14 +401,29 @@ private static boolean and(List predicates) { private static final Context> VARIABLES = Context.of(Map.of()); public static final class UnboundVariableException extends RuntimeException { - private static final long serialVersionUID = 4505117271488648346L; + private static final long serialVersionUID = 4505117271488648346L; - private final Set vars; - private final Set> bindings; + private final Set empty; + private final Set set; + private final Struct in; - private UnboundVariableException(Set vars, Set> bindings) { - this.vars = vars; - this.bindings = bindings; + private UnboundVariableException(Set empty, Set set, Struct in) { + this.empty = empty; + this.set = set; + this.in = in; + } + + private Set> bindings(Map vars) { + return set.map(s -> { + Map vs = vars; + for (int i = 0; i < s.length(); i++) { + Object vin = in.get(i); + if (empty.contains(vin)) { + vs = vs.put(vin, s.get(i)); + } + } + return vs; + }).asSet(); } } @@ -436,8 +446,8 @@ private static boolean doUni(Map vars, Supplier predica try { return VARIABLES.get(vars, predicate); } catch (UnboundVariableException uve) { - if (uve.vars.anyMatch(vars::containsKey)) { - return any(uve.bindings.map(vs -> () -> doUni(vs, predicate))).getAsBoolean(); + if (uve.empty.anyMatch(vars::containsKey)) { + return any(uve.bindings(vars).map(vs -> () -> doUni(vs, predicate))).getAsBoolean(); } else { throw uve; } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 5632baa1..716e106e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -72,6 +72,7 @@ public void test1() { isFalse(PARENT.is("Marijn", "Wim")); isFalse(PARENT.is("Heleeen", "Wim")); + isFalse(PARENT.is("Wim", "Wim")); isTrue(ANCESTOR.is("Carel", "Marijn")); isTrue(ANCESTOR.is("Wim", "Marijn")); @@ -79,6 +80,7 @@ public void test1() { isFalse(ANCESTOR.is("Marijn", "Wim")); isFalse(ANCESTOR.is("Heleeen", "Wim")); isFalse(ANCESTOR.is("Joppe", "Carel")); + isFalse(ANCESTOR.is("Carel", "Carel")); }); } } From 5e52b7fb99e1bfc77899f878711347a8b5e68480 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sun, 17 Nov 2024 16:30:17 +0100 Subject: [PATCH 068/179] refactor rules --- .../java/org/modelingvalue/dclare/Logic.java | 294 +++++++++--------- .../modelingvalue/dclare/test/LogicTest.java | 27 +- 2 files changed, 169 insertions(+), 152 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index ce48c8d6..8035afb0 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiPredicate; -import java.util.function.BooleanSupplier; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; @@ -33,6 +32,7 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.Struct; +import org.modelingvalue.collections.struct.impl.StructImpl; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.collections.util.QuadPredicate; @@ -71,6 +71,14 @@ public String getMessage() { } } + public static final class Relation extends StructImpl { + private static final long serialVersionUID = -3477936037166526320L; + + public Relation(Object... data) { + super(data); + } + } + public static abstract class Functor { private final Constant> extend; @@ -93,31 +101,28 @@ protected final Function derive(Function f) { protected final S bind(S in) { Map vars = VARIABLES.get(); - if (!vars.isEmpty()) { - Object[] pat = in.toArray(); - Object[] out = in.toArray(); - Set empty = Set.of(); - for (int i = 0; i < in.length(); i++) { - Object vin = in.get(i); - if (vars.containsKey(vin)) { - Object vout = vars.get(vin); - if (vout == null) { - pat[i] = null; - empty = empty.add(vin); - } else { - out[i] = vout; - } + Object[] pat = in.toArray(); + Object[] out = in.toArray(); + Set empty = Set.of(); + for (int i = 0; i < in.length(); i++) { + Object vin = in.get(i); + if (vars.containsKey(vin)) { + Object vout = vars.get(vin); + pat[i] = vout; + if (vout == null) { + empty = empty.add(vin); + } else { + out[i] = vout; } } - if (!empty.isEmpty()) { - Set set = extend.get(copy(pat)); - if (!set.isEmpty()) { - throw new UnboundVariableException(empty, set, in); - } + } + if (!empty.isEmpty()) { + Set set = extend.get(copy(pat)); + if (!set.isEmpty()) { + throw new UnboundVariableException(empty, set, in); } - return copy(out); } - return in; + return copy(out); } @SuppressWarnings("rawtypes") @@ -146,57 +151,47 @@ private void extend(int i, S in, Object[] array) { protected abstract S copy(Object[] array); }; - // Relations - - public static final Rel1 rel1(Object id, // - java.util.function.Function p) { - return new Rel1(id, (o) -> p.apply(o).getAsBoolean()); + private static boolean run(Map vars, Supplier predicate) { + return VARIABLES.get(VARIABLES.get().putAll(vars), predicate); } - public static final Rel1 rel1(Object id) { - return new Rel1(id, null); - } + // Relations - public static final Rel2 rel2(Object id, // - java.util.function.BiFunction p) { - return new Rel2(id, (o1, o2) -> p.apply(o1, o2).getAsBoolean()); + public static final Rel1 rel1(Object id) { + return new Rel1(id); } public static final Rel2 rel2(Object id) { - return new Rel2(id, null); - } - - public static final Rel3 rel3(Object id, // - org.modelingvalue.collections.util.TriFunction p) { - return new Rel3(id, (o1, o2, o3) -> p.apply(o1, o2, o3).getAsBoolean()); + return new Rel2(id); } public static final Rel3 rel3(Object id) { - return new Rel3(id, null); - } - - public static final Rel4 rel4(Object id, // - org.modelingvalue.collections.util.QuadFunction p) { - return new Rel4(id, (o1, o2, o3, o4) -> p.apply(o1, o2, o3, o4).getAsBoolean()); + return new Rel3(id); } public static final Rel4 rel4(Object id) { - return new Rel4(id, null); + return new Rel4(id); } public static final class Rel1 extends Functor> { private final Constant, Boolean> constant; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; - private Rel1(Object id, Predicate p) { + private Rel1(Object id) { super(id); - constant = Constant., Boolean> of(id, p != null ? null : false, // - p == null ? null : derive(o -> p.test(o.a())), // - (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); + constant = Constant., Boolean> of(id, false, // + (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); + } + + public void rule(O v1, Supplier p) { + rules = rules.add(o -> run(Map.of(Entry.of(v1, o)), p)); + deriver = s -> any(rules.map(r -> () -> r.test(s.a()))).get(); } @SuppressWarnings("unchecked") - public BooleanSupplier is(O o) { - return () -> constant.get(bind(Single.of(o))); + public Supplier is(O o) { + return () -> constant.get(bind(Single.of(o)), deriver); } public void fact(O o) { @@ -217,17 +212,23 @@ protected Single copy(Object[] array) { public static final class Rel2 extends Functor> { private final Constant, Boolean> constant; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; - private Rel2(Object id, BiPredicate p) { + private Rel2(Object id) { super(id); - constant = Constant., Boolean> of(id, p != null ? null : false, // - p == null ? null : derive(o -> p.test(o.a(), o.b())), // - (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); + constant = Constant., Boolean> of(id, false, // + (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); + } + + public void rule(O1 v1, O2 v2, Supplier p) { + rules = rules.add((o1, o2) -> run(Map.of(Entry.of(v1, o1), Entry.of(v2, o2)), p)); + deriver = s -> any(rules.map(r -> () -> r.test(s.a(), s.b()))).get(); } @SuppressWarnings("unchecked") - public BooleanSupplier is(O1 o1, O2 o2) { - return () -> constant.get(bind(Pair.of(o1, o2))); + public Supplier is(O1 o1, O2 o2) { + return () -> constant.get(bind(Pair.of(o1, o2)), deriver); } public void fact(O1 o1, O2 o2) { @@ -248,17 +249,23 @@ protected Pair copy(Object[] array) { public static final class Rel3 extends Functor> { private final Constant, Boolean> constant; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; - private Rel3(Object id, TriPredicate p) { + private Rel3(Object id) { super(id); - constant = Constant., Boolean> of(id, p != null ? null : false, // - p == null ? null : derive(o -> p.test(o.a(), o.b(), o.c())), // - (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); + constant = Constant., Boolean> of(id, false, // + (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); + } + + public void rule(O1 v1, O2 v2, O3 v3, Supplier p) { + rules = rules.add((o1, o2, o3) -> run(Map.of(Entry.of(v1, o1), Entry.of(v2, o2), Entry.of(v3, o3)), p)); + deriver = s -> any(rules.map(r -> () -> r.test(s.a(), s.b(), s.c()))).get(); } @SuppressWarnings("unchecked") - public BooleanSupplier is(O1 o1, O2 o2, O3 o3) { - return () -> constant.get(bind(Triple.of(o1, o2, o3))); + public Supplier is(O1 o1, O2 o2, O3 o3) { + return () -> constant.get(bind(Triple.of(o1, o2, o3)), deriver); } public void fact(O1 o1, O2 o2, O3 o3) { @@ -279,17 +286,23 @@ protected Triple copy(Object[] array) { public static final class Rel4 extends Functor> { private final Constant, Boolean> constant; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; - private Rel4(Object id, QuadPredicate p) { + private Rel4(Object id) { super(id); - constant = Constant., Boolean> of(id, p != null ? null : false, // - p == null ? null : derive(o -> p.test(o.a(), o.b(), o.c(), o.d())), // - (tx, o, b, t) -> extend(o, t, p != null), CoreSetableModifier.durable); + constant = Constant., Boolean> of(id, false, // + (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); + } + + public void rule(O1 v1, O2 v2, O3 v3, O4 v4, Supplier p) { + rules = rules.add((o1, o2, o3, o4) -> run(Map.of(Entry.of(v1, o1), Entry.of(v2, o2), Entry.of(v3, o3), Entry.of(v4, o4)), p)); + deriver = s -> any(rules.map(r -> () -> r.test(s.a(), s.b(), s.c(), s.d()))).get(); } @SuppressWarnings("unchecked") - public BooleanSupplier is(O1 o1, O2 o2, O3 o3, O4 o4) { - return () -> constant.get(bind(Quadruple.of(o1, o2, o3, o4))); + public Supplier is(O1 o1, O2 o2, O3 o3, O4 o4) { + return () -> constant.get(bind(Quadruple.of(o1, o2, o3, o4)), deriver); } public void fact(O1 o1, O2 o2, O3 o3, O4 o4) { @@ -310,89 +323,81 @@ protected Quadruple copy(Object[] array) { // Not - public static final BooleanSupplier not(BooleanSupplier predicate) { - return () -> !predicate.getAsBoolean(); + public static final Supplier not(Supplier predicate) { + return () -> !predicate.get(); } // Or @SafeVarargs - public static final BooleanSupplier or(BooleanSupplier... predicates) { - return () -> or(List.of(predicates)); + public static final Supplier or(Supplier... predicates) { + List> list = List.of(predicates); + return list.isEmpty() ? () -> false : list.size() == 1 ? list.get(0) : () -> or(list); } - public static final BooleanSupplier any(Collection predicates) { - return () -> or(predicates.asList()); + public static final Supplier any(Collection> predicates) { + List> list = predicates.asList(); + return list.isEmpty() ? () -> false : list.size() == 1 ? list.get(0) : () -> or(list); } - private static boolean or(List predicates) { - if (predicates.isEmpty()) { - return false; - } else if (predicates.size() == 1) { - return predicates.first().getAsBoolean(); - } else { - List or = predicates.random().asList(); - AtomicReference ref = new AtomicReference<>(null); - boolean result = or.anyMatch(p -> { - try { - return p.getAsBoolean(); - } catch (UnboundVariableException uve) { - ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); - return true; - } catch (CircularLogicException cle) { - ref.updateAndGet(rte -> rte == null ? cle : rte); - return false; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof UnboundVariableException) { - throw exc; - } else if (!result && exc != null) { - throw exc; - } else { - return result; + private static boolean or(List> predicates) { + List> or = predicates.random().asList(); + AtomicReference ref = new AtomicReference<>(null); + boolean result = or.anyMatch(p -> { + try { + return p.get(); + } catch (UnboundVariableException uve) { + ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); + return true; + } catch (CircularLogicException cle) { + ref.updateAndGet(rte -> rte == null ? cle : rte); + return false; } + }); + RuntimeException exc = ref.get(); + if (exc instanceof UnboundVariableException) { + throw exc; + } else if (!result && exc != null) { + throw exc; + } else { + return result; } } // And @SafeVarargs - public static final BooleanSupplier and(BooleanSupplier... predicates) { - return () -> and(List.of(predicates)); + public static final Supplier and(Supplier... predicates) { + List> list = List.of(predicates); + return list.isEmpty() ? () -> true : list.size() == 1 ? list.get(0) : () -> and(list); } - public static final BooleanSupplier all(Collection predicates) { - return () -> and(predicates.asList()); + public static final Supplier all(Collection> predicates) { + List> list = predicates.asList(); + return list.isEmpty() ? () -> true : list.size() == 1 ? list.get(0) : () -> and(list); } - private static boolean and(List predicates) { - if (predicates.isEmpty()) { - return true; - } else if (predicates.size() == 1) { - return predicates.first().getAsBoolean(); - } else { - List and = predicates.random().asList(); - AtomicReference ref = new AtomicReference<>(null); - boolean result = and.allMatch(p -> { - try { - return p.getAsBoolean(); - } catch (UnboundVariableException uve) { - ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); - return false; - } catch (CircularLogicException cle) { - ref.updateAndGet(rte -> rte == null ? cle : rte); - return true; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof UnboundVariableException) { - throw exc; - } else if (result && exc != null) { - throw exc; - } else { - return result; + private static boolean and(List> predicates) { + List> and = predicates.random().asList(); + AtomicReference ref = new AtomicReference<>(null); + boolean result = and.allMatch(p -> { + try { + return p.get(); + } catch (UnboundVariableException uve) { + ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); + return false; + } catch (CircularLogicException cle) { + ref.updateAndGet(rte -> rte == null ? cle : rte); + return true; } + }); + RuntimeException exc = ref.get(); + if (exc instanceof UnboundVariableException) { + throw exc; + } else if (result && exc != null) { + throw exc; + } else { + return result; } } @@ -428,26 +433,35 @@ private Set> bindings(Map vars) { } @SuppressWarnings("unchecked") - public static final BooleanSupplier uni(V1 v1, BooleanSupplier predicate) { - return () -> doUni(Collection.of(v1).asMap(o -> Entry.of(o, null)), () -> predicate.getAsBoolean()); + public static final Supplier uni(V1 v1, Supplier predicate) { + Map vars = Map.of(Entry.of(v1, null)); + return () -> doUni(vars, predicate); + } + + @SuppressWarnings("unchecked") + public static final Supplier uni(V1 v1, V2 v2, Supplier predicate) { + Map vars = Map.of(Entry.of(v1, null), Entry.of(v2, null)); + return () -> doUni(vars, predicate); } @SuppressWarnings("unchecked") - public static final BooleanSupplier uni(V1 v1, V2 v2, BooleanSupplier predicate) { - return () -> doUni(Collection.of(v1, v2).asMap(o -> Entry.of(o, null)), () -> predicate.getAsBoolean()); + public static final Supplier uni(V1 v1, V2 v2, V3 v3, Supplier predicate) { + Map vars = Map.of(Entry.of(v1, null), Entry.of(v2, null), Entry.of(v3, null)); + return () -> doUni(vars, predicate); } @SuppressWarnings("unchecked") - public static final BooleanSupplier uni(V1 v1, V2 v2, V3 v3, BooleanSupplier predicate) { - return () -> doUni(Collection.of(v1, v2, v3).asMap(o -> Entry.of(o, null)), () -> predicate.getAsBoolean()); + public static final Supplier uni(V1 v1, V2 v2, V3 v3, V4 v4, Supplier predicate) { + Map vars = Map.of(Entry.of(v1, null), Entry.of(v2, null), Entry.of(v3, null), Entry.of(v4, null)); + return () -> doUni(vars, predicate); } private static boolean doUni(Map vars, Supplier predicate) { try { - return VARIABLES.get(vars, predicate); + return run(vars, predicate); } catch (UnboundVariableException uve) { if (uve.empty.anyMatch(vars::containsKey)) { - return any(uve.bindings(vars).map(vs -> () -> doUni(vs, predicate))).getAsBoolean(); + return any(uve.bindings(vars).map(vs -> () -> doUni(vs, predicate))).get(); } else { throw uve; } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 716e106e..f76731d0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -24,7 +24,7 @@ import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; -import java.util.function.BooleanSupplier; +import java.util.function.Supplier; import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.dclare.Logic.Rel2; @@ -40,21 +40,24 @@ void run(Runnable test) { universeTransaction.waitForEnd(); } - static void isTrue(BooleanSupplier bs) { - assertTrue(bs.getAsBoolean()); + static void isTrue(Supplier bs) { + assertTrue(bs.get()); } - static void isFalse(BooleanSupplier bs) { - assertTrue(!bs.getAsBoolean()); + static void isFalse(Supplier bs) { + assertTrue(!bs.get()); } - static final String X = "$X"; - static final Rel2 PARENT = rel2("parent"); - - static final Rel2 ANCESTOR = rel2("ancestor", // - (a, o) -> or(PARENT.is(a, o), // - uni(X, and(LogicTest.ANCESTOR.is(a, X), PARENT.is(X, o))))); + static final Rel2 ANCESTOR = rel2("ancestor"); + + static final String A = "A"; // Ancestor + static final String O = "O"; // Offspring + static final String R = "R"; // Relative + static { + ANCESTOR.rule(A, O, PARENT.is(A, O)); // + ANCESTOR.rule(A, O, uni(R, and(ANCESTOR.is(A, R), PARENT.is(R, O)))); + } @RepeatedTest(512) public void test1() { @@ -74,8 +77,8 @@ public void test1() { isFalse(PARENT.is("Heleeen", "Wim")); isFalse(PARENT.is("Wim", "Wim")); - isTrue(ANCESTOR.is("Carel", "Marijn")); isTrue(ANCESTOR.is("Wim", "Marijn")); + isTrue(ANCESTOR.is("Carel", "Marijn")); isFalse(ANCESTOR.is("Marijn", "Wim")); isFalse(ANCESTOR.is("Heleeen", "Wim")); From 6727c84f7a8eca504f0090c9c4fba1734b82d566 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sun, 17 Nov 2024 16:38:13 +0100 Subject: [PATCH 069/179] bind based on array --- .../java/org/modelingvalue/dclare/Logic.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 8035afb0..60f89741 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -99,13 +99,13 @@ protected final Function derive(Function f) { }; } - protected final S bind(S in) { + protected final S bind(Object... in) { Map vars = VARIABLES.get(); - Object[] pat = in.toArray(); - Object[] out = in.toArray(); + Object[] pat = in.clone(); + Object[] out = in.clone(); Set empty = Set.of(); - for (int i = 0; i < in.length(); i++) { - Object vin = in.get(i); + for (int i = 0; i < in.length; i++) { + Object vin = in[i]; if (vars.containsKey(vin)) { Object vout = vars.get(vin); pat[i] = vout; @@ -117,12 +117,12 @@ protected final S bind(S in) { } } if (!empty.isEmpty()) { - Set set = extend.get(copy(pat)); + Set set = extend.get(struct(pat)); if (!set.isEmpty()) { throw new UnboundVariableException(empty, set, in); } } - return copy(out); + return struct(out); } @SuppressWarnings("rawtypes") @@ -137,18 +137,18 @@ private void extend(int i, S in, Object[] array) { array = array.clone(); if (array[i] == null) { array[i] = in.get(i); - extend.force(copy(array), Set::add, in); + extend.force(struct(array), Set::add, in); } extend(i + 1, in, array); if (array[i] != null) { array[i] = null; - extend.force(copy(array), Set::add, in); + extend.force(struct(array), Set::add, in); } extend(i + 1, in, array); } } - protected abstract S copy(Object[] array); + protected abstract S struct(Object[] array); }; private static boolean run(Map vars, Supplier predicate) { @@ -191,7 +191,7 @@ public void rule(O v1, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O o) { - return () -> constant.get(bind(Single.of(o)), deriver); + return () -> constant.get(bind(o), deriver); } public void fact(O o) { @@ -205,7 +205,7 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected Single copy(Object[] array) { + protected Single struct(Object[] array) { return Single.of((O) array[0]); } } @@ -228,7 +228,7 @@ public void rule(O1 v1, O2 v2, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O1 o1, O2 o2) { - return () -> constant.get(bind(Pair.of(o1, o2)), deriver); + return () -> constant.get(bind(o1, o2), deriver); } public void fact(O1 o1, O2 o2) { @@ -242,7 +242,7 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected Pair copy(Object[] array) { + protected Pair struct(Object[] array) { return Pair.of((O1) array[0], (O2) array[1]); } } @@ -265,7 +265,7 @@ public void rule(O1 v1, O2 v2, O3 v3, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O1 o1, O2 o2, O3 o3) { - return () -> constant.get(bind(Triple.of(o1, o2, o3)), deriver); + return () -> constant.get(bind(o1, o2, o3), deriver); } public void fact(O1 o1, O2 o2, O3 o3) { @@ -279,7 +279,7 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected Triple copy(Object[] array) { + protected Triple struct(Object[] array) { return Triple.of((O1) array[0], (O2) array[1], (O3) array[2]); } } @@ -302,7 +302,7 @@ public void rule(O1 v1, O2 v2, O3 v3, O4 v4, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O1 o1, O2 o2, O3 o3, O4 o4) { - return () -> constant.get(bind(Quadruple.of(o1, o2, o3, o4)), deriver); + return () -> constant.get(bind(o1, o2, o3, o4), deriver); } public void fact(O1 o1, O2 o2, O3 o3, O4 o4) { @@ -316,7 +316,7 @@ public String toString() { @SuppressWarnings("unchecked") @Override - protected Quadruple copy(Object[] array) { + protected Quadruple struct(Object[] array) { return Quadruple.of((O1) array[0], (O2) array[1], (O3) array[2], (O4) array[3]); } } @@ -410,9 +410,9 @@ public static final class UnboundVariableException extends RuntimeException { private final Set empty; private final Set set; - private final Struct in; + private final Object[] in; - private UnboundVariableException(Set empty, Set set, Struct in) { + private UnboundVariableException(Set empty, Set set, Object[] in) { this.empty = empty; this.set = set; this.in = in; @@ -422,7 +422,7 @@ private Set> bindings(Map vars) { return set.map(s -> { Map vs = vars; for (int i = 0; i < s.length(); i++) { - Object vin = in.get(i); + Object vin = in[i]; if (empty.contains(vin)) { vs = vs.put(vin, s.get(i)); } From 0a48f68addc8cc7c44bc891411663f8b00ae6001 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 10:54:15 +0100 Subject: [PATCH 070/179] Working Logic --- .../java/org/modelingvalue/dclare/Logic.java | 219 +++++++++--------- .../modelingvalue/dclare/test/LogicTest.java | 14 +- 2 files changed, 120 insertions(+), 113 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 60f89741..1e5d2fca 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -83,76 +83,95 @@ public static abstract class Functor { private final Constant> extend; protected Functor(Object id) { - extend = Constant.> of(Single.of(id), Set.of(), CoreSetableModifier.durable); + extend = Constant.> of(id, Set.of(), CoreSetableModifier.durable); } - @SuppressWarnings("rawtypes") - protected final Function derive(Function f) { - return o -> { - Pair slot = Pair.of(this, o); - List> pre = DERIVED.get(); - if (pre.contains(slot)) { - throw new CircularLogicException(pre, slot); - } else { - return DERIVED.get(pre.prepend(slot), () -> f.apply(o)); - } - }; + @Override + public String toString() { + return extend.toString(); } - protected final S bind(Object... in) { + @SuppressWarnings("rawtypes") + protected final Boolean get(Function deriver, Object... in) { + Set empty = deriver == null ? Set.of() : null; Map vars = VARIABLES.get(); - Object[] pat = in.clone(); Object[] out = in.clone(); - Set empty = Set.of(); for (int i = 0; i < in.length; i++) { - Object vin = in[i]; - if (vars.containsKey(vin)) { - Object vout = vars.get(vin); - pat[i] = vout; - if (vout == null) { - empty = empty.add(vin); + while (vars.containsKey(in[i])) { + Object v = vars.get(in[i]); + if (v == null) { + if (deriver == null) { + empty = empty.add(out[i]); + out[i] = null; + } + break; } else { - out[i] = vout; + out[i] = v; + in[i] = v; } } } - if (!empty.isEmpty()) { - Set set = extend.get(struct(pat)); - if (!set.isEmpty()) { + S s = struct(out); + Pair slot = Pair.of(this, s); + List> pre = DERIVED.get(); + if (deriver != null) { + System.err.println(" ".repeat(pre.size()) + slot); + if (pre.contains(slot)) { + throw new CircularLogicException(pre, slot); + } else { + return DERIVED.get(pre.prepend(slot), () -> deriver.apply(s)); + } + } else { + Set set = extend.get(s); + System.err.println(" ".repeat(pre.size()) + slot + " " + set); + if (set.isEmpty()) { + return false; + } else if (!empty.isEmpty()) { throw new UnboundVariableException(empty, set, in); + } else { + return true; } } - return struct(out); } @SuppressWarnings("rawtypes") - protected final void extend(S in, Boolean res, boolean der) { - if (res && !der) { - extend(0, in, in.toArray()); + protected final void set(S in, Boolean res, Function deriver) { + if (res && deriver == null) { + extend.force(in, Set::add, in); + set(0, in, in.toArray()); } } - private void extend(int i, S in, Object[] array) { + private void set(int i, S in, Object[] array) { if (i < array.length) { array = array.clone(); if (array[i] == null) { array[i] = in.get(i); extend.force(struct(array), Set::add, in); } - extend(i + 1, in, array); + set(i + 1, in, array); if (array[i] != null) { array[i] = null; extend.force(struct(array), Set::add, in); } - extend(i + 1, in, array); + set(i + 1, in, array); } } protected abstract S struct(Object[] array); }; + @SuppressWarnings("rawtypes") private static boolean run(Map vars, Supplier predicate) { - return VARIABLES.get(VARIABLES.get().putAll(vars), predicate); + Map pre = VARIABLES.get(); + List> der = DERIVED.get(); + if (vars.filter(kv -> kv.getValue() == null).anyMatch(kv -> pre.containsKey(kv.getKey()) && pre.get(kv.getKey()) == null)) { + throw new CircularLogicException(der, der.first()); + } else { + Map all = pre.putAll(vars); + System.err.println(" ".repeat(der.size() * 2 - 1) + all); + return VARIABLES.get(all, predicate); + } } // Relations @@ -173,52 +192,41 @@ public static final Rel4 rel4(Object id) { return new Rel4(id); } - public static final class Rel1 extends Functor> { - private final Constant, Boolean> constant; - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; + public static final class Rel1 extends Functor> { + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; private Rel1(Object id) { super(id); - constant = Constant., Boolean> of(id, false, // - (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); } - public void rule(O v1, Supplier p) { - rules = rules.add(o -> run(Map.of(Entry.of(v1, o)), p)); + public void rule(O1 v1, Supplier p) { + rules = rules.add(o1 -> run(Map.of(Entry.of(v1, o1)), p)); deriver = s -> any(rules.map(r -> () -> r.test(s.a()))).get(); } @SuppressWarnings("unchecked") - public Supplier is(O o) { - return () -> constant.get(bind(o), deriver); - } - - public void fact(O o) { - constant.set(Single.of(o), true); + public Supplier is(O1 o1) { + return () -> get(deriver, o1); } - @Override - public String toString() { - return constant.toString(); + public void fact(O1 o1) { + set(Single.of(o1), true, deriver); } @SuppressWarnings("unchecked") @Override - protected Single struct(Object[] array) { - return Single.of((O) array[0]); + protected Single struct(Object[] array) { + return Single.of((O1) array[0]); } } public static final class Rel2 extends Functor> { - private final Constant, Boolean> constant; - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; private Rel2(Object id) { super(id); - constant = Constant., Boolean> of(id, false, // - (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); } public void rule(O1 v1, O2 v2, Supplier p) { @@ -228,16 +236,11 @@ public void rule(O1 v1, O2 v2, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O1 o1, O2 o2) { - return () -> constant.get(bind(o1, o2), deriver); + return () -> get(deriver, o1, o2); } public void fact(O1 o1, O2 o2) { - constant.set(Pair.of(o1, o2), true); - } - - @Override - public String toString() { - return constant.toString(); + set(Pair.of(o1, o2), true, deriver); } @SuppressWarnings("unchecked") @@ -248,14 +251,11 @@ protected Pair struct(Object[] array) { } public static final class Rel3 extends Functor> { - private final Constant, Boolean> constant; - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; private Rel3(Object id) { super(id); - constant = Constant., Boolean> of(id, false, // - (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); } public void rule(O1 v1, O2 v2, O3 v3, Supplier p) { @@ -265,16 +265,11 @@ public void rule(O1 v1, O2 v2, O3 v3, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O1 o1, O2 o2, O3 o3) { - return () -> constant.get(bind(o1, o2, o3), deriver); + return () -> get(deriver, o1, o2, o3); } public void fact(O1 o1, O2 o2, O3 o3) { - constant.set(Triple.of(o1, o2, o3), true); - } - - @Override - public String toString() { - return constant.toString(); + set(Triple.of(o1, o2, o3), true, deriver); } @SuppressWarnings("unchecked") @@ -285,14 +280,11 @@ protected Triple struct(Object[] array) { } public static final class Rel4 extends Functor> { - private final Constant, Boolean> constant; - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; + private Set> rules = Set.of(); + private Function, Boolean> deriver = null; private Rel4(Object id) { super(id); - constant = Constant., Boolean> of(id, false, // - (tx, o, b, t) -> extend(o, t, deriver != null), CoreSetableModifier.durable); } public void rule(O1 v1, O2 v2, O3 v3, O4 v4, Supplier p) { @@ -302,16 +294,11 @@ public void rule(O1 v1, O2 v2, O3 v3, O4 v4, Supplier p) { @SuppressWarnings("unchecked") public Supplier is(O1 o1, O2 o2, O3 o3, O4 o4) { - return () -> constant.get(bind(o1, o2, o3, o4), deriver); + return () -> get(deriver, o1, o2, o3, o4); } public void fact(O1 o1, O2 o2, O3 o3, O4 o4) { - constant.set(Quadruple.of(o1, o2, o3, o4), true); - } - - @Override - public String toString() { - return constant.toString(); + set(Quadruple.of(o1, o2, o3, o4), true, deriver); } @SuppressWarnings("unchecked") @@ -347,8 +334,14 @@ private static boolean or(List> predicates) { try { return p.get(); } catch (UnboundVariableException uve) { - ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); - return true; + ref.updateAndGet(rte -> { + if (rte instanceof UnboundVariableException) { + return ((UnboundVariableException) rte).merge(uve); + } else { + return rte == null || rte instanceof CircularLogicException ? uve : rte; + } + }); + return false; } catch (CircularLogicException cle) { ref.updateAndGet(rte -> rte == null ? cle : rte); return false; @@ -384,8 +377,14 @@ private static boolean and(List> predicates) { try { return p.get(); } catch (UnboundVariableException uve) { - ref.updateAndGet(rte -> rte == null || rte instanceof CircularLogicException ? uve : rte); - return false; + ref.updateAndGet(rte -> { + if (rte instanceof UnboundVariableException) { + return ((UnboundVariableException) rte).merge(uve); + } else { + return rte == null || rte instanceof CircularLogicException ? uve : rte; + } + }); + return true; } catch (CircularLogicException cle) { ref.updateAndGet(rte -> rte == null ? cle : rte); return true; @@ -406,30 +405,30 @@ private static boolean and(List> predicates) { private static final Context> VARIABLES = Context.of(Map.of()); public static final class UnboundVariableException extends RuntimeException { - private static final long serialVersionUID = 4505117271488648346L; + private static final long serialVersionUID = 4505117271488648346L; - private final Set empty; - private final Set set; - private final Object[] in; + private final Set> bindings; private UnboundVariableException(Set empty, Set set, Object[] in) { - this.empty = empty; - this.set = set; - this.in = in; - } - - private Set> bindings(Map vars) { - return set.map(s -> { - Map vs = vars; - for (int i = 0; i < s.length(); i++) { + this.bindings = set.map(b -> { + Map vars = Map.of(); + for (int i = 0; i < b.length(); i++) { Object vin = in[i]; if (empty.contains(vin)) { - vs = vs.put(vin, s.get(i)); + vars = vars.put(vin, b.get(i)); } } - return vs; + return vars; }).asSet(); } + + private UnboundVariableException(Set> bindings) { + this.bindings = bindings; + } + + private UnboundVariableException merge(UnboundVariableException other) { + return new UnboundVariableException(bindings.addAll(other.bindings)); + } } @SuppressWarnings("unchecked") @@ -460,11 +459,7 @@ private static boolean doUni(Map vars, Supplier predica try { return run(vars, predicate); } catch (UnboundVariableException uve) { - if (uve.empty.anyMatch(vars::containsKey)) { - return any(uve.bindings(vars).map(vs -> () -> doUni(vs, predicate))).get(); - } else { - throw uve; - } + return any(uve.bindings.map(vs -> () -> doUni(vars.putAll(vs), predicate))).get(); } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index f76731d0..4df40d6b 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -27,6 +27,7 @@ import java.util.function.Supplier; import org.junit.jupiter.api.RepeatedTest; +import org.modelingvalue.collections.Collection; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -35,7 +36,7 @@ public class LogicTest { void run(Runnable test) { UniverseTransaction universeTransaction = new UniverseTransaction(Universe.of(), THE_POOL); - universeTransaction.put("test", test); + universeTransaction.put("test", Collection.sequential(test)); universeTransaction.stop(); universeTransaction.waitForEnd(); } @@ -61,6 +62,17 @@ static void isFalse(Supplier bs) { @RepeatedTest(512) public void test1() { + run(() -> { + PARENT.fact("Carel", "Jan"); + PARENT.fact("Jan", "Wim"); + PARENT.fact("Wim", "Joppe"); + + isTrue(ANCESTOR.is("Carel", "Joppe")); + }); + } + + @RepeatedTest(512) + public void test2() { run(() -> { PARENT.fact("Carel", "Jan"); PARENT.fact("Jan", "Wim"); From fc61f032cb62c76a0dc8f30dcf5a94c77e3ed78e Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 11:07:35 +0100 Subject: [PATCH 071/179] remove tracing --- src/main/java/org/modelingvalue/dclare/Logic.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 1e5d2fca..4a9d97c6 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -112,10 +112,10 @@ protected final Boolean get(Function deriver, Object... in) { } } S s = struct(out); - Pair slot = Pair.of(this, s); - List> pre = DERIVED.get(); + if (deriver != null) { - System.err.println(" ".repeat(pre.size()) + slot); + Pair slot = Pair.of(this, s); + List> pre = DERIVED.get(); if (pre.contains(slot)) { throw new CircularLogicException(pre, slot); } else { @@ -123,7 +123,6 @@ protected final Boolean get(Function deriver, Object... in) { } } else { Set set = extend.get(s); - System.err.println(" ".repeat(pre.size()) + slot + " " + set); if (set.isEmpty()) { return false; } else if (!empty.isEmpty()) { @@ -164,13 +163,11 @@ private void set(int i, S in, Object[] array) { @SuppressWarnings("rawtypes") private static boolean run(Map vars, Supplier predicate) { Map pre = VARIABLES.get(); - List> der = DERIVED.get(); if (vars.filter(kv -> kv.getValue() == null).anyMatch(kv -> pre.containsKey(kv.getKey()) && pre.get(kv.getKey()) == null)) { + List> der = DERIVED.get(); throw new CircularLogicException(der, der.first()); } else { - Map all = pre.putAll(vars); - System.err.println(" ".repeat(der.size() * 2 - 1) + all); - return VARIABLES.get(all, predicate); + return VARIABLES.get(pre.putAll(vars), predicate); } } From 10ed57957af3250dfac2ceaebaaaf524b7c85e5f Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 11:10:41 +0100 Subject: [PATCH 072/179] less annotations --- src/main/java/org/modelingvalue/dclare/Logic.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 4a9d97c6..3a24d0af 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -48,21 +48,18 @@ private Logic() { @SuppressWarnings("rawtypes") private static final Context>> DERIVED = Context.of(List.of()); + @SuppressWarnings("rawtypes") public static final class CircularLogicException extends RuntimeException { private static final long serialVersionUID = 293433487448006753L; - @SuppressWarnings("rawtypes") private final List> derived; - @SuppressWarnings("rawtypes") private final Pair current; - @SuppressWarnings("rawtypes") private CircularLogicException(List> derived, Pair current) { this.derived = derived; this.current = current; } - @SuppressWarnings("rawtypes") @Override public String getMessage() { int i = derived.firstIndexOf(current); From cabd9d09189ebceb6325e9e88782c78fcef6d0a2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 11:30:48 +0100 Subject: [PATCH 073/179] parallel --- .../java/org/modelingvalue/dclare/Logic.java | 135 ++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 3 +- 2 files changed, 77 insertions(+), 61 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 3a24d0af..25774cdd 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -48,26 +48,6 @@ private Logic() { @SuppressWarnings("rawtypes") private static final Context>> DERIVED = Context.of(List.of()); - @SuppressWarnings("rawtypes") - public static final class CircularLogicException extends RuntimeException { - private static final long serialVersionUID = 293433487448006753L; - - private final List> derived; - private final Pair current; - - private CircularLogicException(List> derived, Pair current) { - this.derived = derived; - this.current = current; - } - - @Override - public String getMessage() { - int i = derived.firstIndexOf(current); - List> cycle = derived.sublist(0, i + 1).prepend(current); - return "Cycle " + cycle.reverse().asList().toString().substring(4); - } - } - public static final class Relation extends StructImpl { private static final long serialVersionUID = -3477936037166526320L; @@ -109,7 +89,6 @@ protected final Boolean get(Function deriver, Object... in) { } } S s = struct(out); - if (deriver != null) { Pair slot = Pair.of(this, s); List> pre = DERIVED.get(); @@ -123,7 +102,17 @@ protected final Boolean get(Function deriver, Object... in) { if (set.isEmpty()) { return false; } else if (!empty.isEmpty()) { - throw new UnboundVariableException(empty, set, in); + Set em = empty; + throw new UnboundVariableException(set.map(b -> { + Map vs = Map.of(); + for (int i = 0; i < b.length(); i++) { + Object vin = in[i]; + if (em.contains(vin)) { + vs = vs.put(vin, b.get(i)); + } + } + return vs; + }).asSet()); } else { return true; } @@ -160,11 +149,11 @@ private void set(int i, S in, Object[] array) { @SuppressWarnings("rawtypes") private static boolean run(Map vars, Supplier predicate) { Map pre = VARIABLES.get(); - if (vars.filter(kv -> kv.getValue() == null).anyMatch(kv -> pre.containsKey(kv.getKey()) && pre.get(kv.getKey()) == null)) { - List> der = DERIVED.get(); - throw new CircularLogicException(der, der.first()); - } else { + Set cycle = vars.filter(kv -> kv.getValue() == null).map(Entry::getKey).filter(k -> pre.containsKey(k) && pre.get(k) == null).asSet(); + if (cycle.isEmpty()) { return VARIABLES.get(pre.putAll(vars), predicate); + } else { + throw new CircularBindingException(cycle); } } @@ -332,12 +321,12 @@ private static boolean or(List> predicates) { if (rte instanceof UnboundVariableException) { return ((UnboundVariableException) rte).merge(uve); } else { - return rte == null || rte instanceof CircularLogicException ? uve : rte; + return rte == null || rte instanceof CycleExcpetion ? uve : rte; } }); return false; - } catch (CircularLogicException cle) { - ref.updateAndGet(rte -> rte == null ? cle : rte); + } catch (CycleExcpetion ce) { + ref.updateAndGet(rte -> rte == null ? ce : rte); return false; } }); @@ -375,12 +364,12 @@ private static boolean and(List> predicates) { if (rte instanceof UnboundVariableException) { return ((UnboundVariableException) rte).merge(uve); } else { - return rte == null || rte instanceof CircularLogicException ? uve : rte; + return rte == null || rte instanceof CycleExcpetion ? uve : rte; } }); return true; - } catch (CircularLogicException cle) { - ref.updateAndGet(rte -> rte == null ? cle : rte); + } catch (CycleExcpetion ce) { + ref.updateAndGet(rte -> rte == null ? ce : rte); return true; } }); @@ -398,33 +387,6 @@ private static boolean and(List> predicates) { private static final Context> VARIABLES = Context.of(Map.of()); - public static final class UnboundVariableException extends RuntimeException { - private static final long serialVersionUID = 4505117271488648346L; - - private final Set> bindings; - - private UnboundVariableException(Set empty, Set set, Object[] in) { - this.bindings = set.map(b -> { - Map vars = Map.of(); - for (int i = 0; i < b.length(); i++) { - Object vin = in[i]; - if (empty.contains(vin)) { - vars = vars.put(vin, b.get(i)); - } - } - return vars; - }).asSet(); - } - - private UnboundVariableException(Set> bindings) { - this.bindings = bindings; - } - - private UnboundVariableException merge(UnboundVariableException other) { - return new UnboundVariableException(bindings.addAll(other.bindings)); - } - } - @SuppressWarnings("unchecked") public static final Supplier uni(V1 v1, Supplier predicate) { Map vars = Map.of(Entry.of(v1, null)); @@ -457,4 +419,59 @@ private static boolean doUni(Map vars, Supplier predica } } + // Runtime Exceptions + + public static final class UnboundVariableException extends RuntimeException { + private static final long serialVersionUID = 4505117271488648346L; + + private final Set> bindings; + + private UnboundVariableException(Set> bindings) { + this.bindings = bindings; + } + + private UnboundVariableException merge(UnboundVariableException other) { + return new UnboundVariableException(bindings.addAll(other.bindings)); + } + } + + private static abstract class CycleExcpetion extends RuntimeException { + private static final long serialVersionUID = -1561492438458671302L; + } + + public static final class CircularBindingException extends CycleExcpetion { + private static final long serialVersionUID = 1636584651815799600L; + + private final Set cycle; + + private CircularBindingException(Set cycle) { + this.cycle = cycle; + } + + @Override + public String getMessage() { + return "Cycle Variables " + cycle.toString().substring(3); + } + } + + @SuppressWarnings("rawtypes") + public static final class CircularLogicException extends CycleExcpetion { + private static final long serialVersionUID = 293433487448006753L; + + private final List> derived; + private final Pair current; + + private CircularLogicException(List> derived, Pair current) { + this.derived = derived; + this.current = current; + } + + @Override + public String getMessage() { + int i = derived.firstIndexOf(current); + List> cycle = derived.sublist(0, i + 1).prepend(current); + return "Cycle Logic " + cycle.reverse().asList().toString().substring(4); + } + } + } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 4df40d6b..65226ab3 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -27,7 +27,6 @@ import java.util.function.Supplier; import org.junit.jupiter.api.RepeatedTest; -import org.modelingvalue.collections.Collection; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -36,7 +35,7 @@ public class LogicTest { void run(Runnable test) { UniverseTransaction universeTransaction = new UniverseTransaction(Universe.of(), THE_POOL); - universeTransaction.put("test", Collection.sequential(test)); + universeTransaction.put("test", test); universeTransaction.stop(); universeTransaction.waitForEnd(); } From fa4f90ef4191a84206ee2b0737b863afd1f69eab Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 11:42:25 +0100 Subject: [PATCH 074/179] Renamings --- .../java/org/modelingvalue/dclare/Logic.java | 56 +++++++++---------- .../modelingvalue/dclare/test/LogicTest.java | 13 +---- 2 files changed, 29 insertions(+), 40 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 25774cdd..238db767 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -103,7 +103,7 @@ protected final Boolean get(Function deriver, Object... in) { return false; } else if (!empty.isEmpty()) { Set em = empty; - throw new UnboundVariableException(set.map(b -> { + throw new BindingsFoundException(set.map(b -> { Map vs = Map.of(); for (int i = 0; i < b.length(); i++) { Object vin = in[i]; @@ -153,7 +153,7 @@ private static boolean run(Map vars, Supplier predicate if (cycle.isEmpty()) { return VARIABLES.get(pre.putAll(vars), predicate); } else { - throw new CircularBindingException(cycle); + throw new CircularVariableException(cycle); } } @@ -316,22 +316,22 @@ private static boolean or(List> predicates) { boolean result = or.anyMatch(p -> { try { return p.get(); - } catch (UnboundVariableException uve) { + } catch (BindingsFoundException bve) { ref.updateAndGet(rte -> { - if (rte instanceof UnboundVariableException) { - return ((UnboundVariableException) rte).merge(uve); + if (rte instanceof BindingsFoundException) { + return ((BindingsFoundException) rte).merge(bve); } else { - return rte == null || rte instanceof CycleExcpetion ? uve : rte; + return rte == null || rte instanceof CycleException ? bve : rte; } }); return false; - } catch (CycleExcpetion ce) { + } catch (CycleException ce) { ref.updateAndGet(rte -> rte == null ? ce : rte); return false; } }); RuntimeException exc = ref.get(); - if (exc instanceof UnboundVariableException) { + if (exc instanceof BindingsFoundException) { throw exc; } else if (!result && exc != null) { throw exc; @@ -359,22 +359,22 @@ private static boolean and(List> predicates) { boolean result = and.allMatch(p -> { try { return p.get(); - } catch (UnboundVariableException uve) { + } catch (BindingsFoundException bve) { ref.updateAndGet(rte -> { - if (rte instanceof UnboundVariableException) { - return ((UnboundVariableException) rte).merge(uve); + if (rte instanceof BindingsFoundException) { + return ((BindingsFoundException) rte).merge(bve); } else { - return rte == null || rte instanceof CycleExcpetion ? uve : rte; + return rte == null || rte instanceof CycleException ? bve : rte; } }); return true; - } catch (CycleExcpetion ce) { + } catch (CycleException ce) { ref.updateAndGet(rte -> rte == null ? ce : rte); return true; } }); RuntimeException exc = ref.get(); - if (exc instanceof UnboundVariableException) { + if (exc instanceof BindingsFoundException) { throw exc; } else if (result && exc != null) { throw exc; @@ -414,48 +414,48 @@ public static final Supplier uni(V1 v1, V2 v2, V3 v3, private static boolean doUni(Map vars, Supplier predicate) { try { return run(vars, predicate); - } catch (UnboundVariableException uve) { - return any(uve.bindings.map(vs -> () -> doUni(vars.putAll(vs), predicate))).get(); + } catch (BindingsFoundException bve) { + return any(bve.bindings.map(vs -> () -> doUni(vars.putAll(vs), predicate))).get(); } } // Runtime Exceptions - public static final class UnboundVariableException extends RuntimeException { + public static final class BindingsFoundException extends RuntimeException { private static final long serialVersionUID = 4505117271488648346L; private final Set> bindings; - private UnboundVariableException(Set> bindings) { + private BindingsFoundException(Set> bindings) { this.bindings = bindings; } - private UnboundVariableException merge(UnboundVariableException other) { - return new UnboundVariableException(bindings.addAll(other.bindings)); + private BindingsFoundException merge(BindingsFoundException other) { + return new BindingsFoundException(bindings.addAll(other.bindings)); } } - private static abstract class CycleExcpetion extends RuntimeException { + private static abstract class CycleException extends RuntimeException { private static final long serialVersionUID = -1561492438458671302L; } - public static final class CircularBindingException extends CycleExcpetion { + public static final class CircularVariableException extends CycleException { private static final long serialVersionUID = 1636584651815799600L; - private final Set cycle; + private final Set vars; - private CircularBindingException(Set cycle) { - this.cycle = cycle; + private CircularVariableException(Set vars) { + this.vars = vars; } @Override public String getMessage() { - return "Cycle Variables " + cycle.toString().substring(3); + return "Circular Variables " + vars.toString().substring(3); } } @SuppressWarnings("rawtypes") - public static final class CircularLogicException extends CycleExcpetion { + public static final class CircularLogicException extends CycleException { private static final long serialVersionUID = 293433487448006753L; private final List> derived; @@ -470,7 +470,7 @@ private CircularLogicException(List> derived, Pair> cycle = derived.sublist(0, i + 1).prepend(current); - return "Cycle Logic " + cycle.reverse().asList().toString().substring(4); + return "Circular Logic " + cycle.reverse().asList().toString().substring(4); } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 65226ab3..ed897d3e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -59,19 +59,8 @@ static void isFalse(Supplier bs) { ANCESTOR.rule(A, O, uni(R, and(ANCESTOR.is(A, R), PARENT.is(R, O)))); } - @RepeatedTest(512) + @RepeatedTest(1024) public void test1() { - run(() -> { - PARENT.fact("Carel", "Jan"); - PARENT.fact("Jan", "Wim"); - PARENT.fact("Wim", "Joppe"); - - isTrue(ANCESTOR.is("Carel", "Joppe")); - }); - } - - @RepeatedTest(512) - public void test2() { run(() -> { PARENT.fact("Carel", "Jan"); PARENT.fact("Jan", "Wim"); From 0b5762207602a5a70d78c3d5e2f0ee00356e844c Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 12:16:55 +0100 Subject: [PATCH 075/179] derived facts --- .../java/org/modelingvalue/dclare/Logic.java | 72 ++++++++++--------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 238db767..bda81c97 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -70,15 +70,15 @@ public String toString() { @SuppressWarnings("rawtypes") protected final Boolean get(Function deriver, Object... in) { - Set empty = deriver == null ? Set.of() : null; + Set empty = Set.of(); Map vars = VARIABLES.get(); Object[] out = in.clone(); for (int i = 0; i < in.length; i++) { while (vars.containsKey(in[i])) { Object v = vars.get(in[i]); if (v == null) { + empty = empty.add(in[i]); if (deriver == null) { - empty = empty.add(out[i]); out[i] = null; } break; @@ -89,42 +89,44 @@ protected final Boolean get(Function deriver, Object... in) { } } S s = struct(out); - if (deriver != null) { - Pair slot = Pair.of(this, s); - List> pre = DERIVED.get(); - if (pre.contains(slot)) { - throw new CircularLogicException(pre, slot); - } else { - return DERIVED.get(pre.prepend(slot), () -> deriver.apply(s)); - } - } else { - Set set = extend.get(s); - if (set.isEmpty()) { - return false; - } else if (!empty.isEmpty()) { - Set em = empty; - throw new BindingsFoundException(set.map(b -> { - Map vs = Map.of(); - for (int i = 0; i < b.length(); i++) { - Object vin = in[i]; - if (em.contains(vin)) { - vs = vs.put(vin, b.get(i)); - } + Set set = deriver == null || empty.isEmpty() ? extend.get(s) : Set.of(); + if (set.isEmpty()) { + if (deriver != null) { + Pair slot = Pair.of(this, s); + List> pre = DERIVED.get(); + if (pre.contains(slot)) { + throw new CircularLogicException(pre, slot); + } else { + Boolean result = DERIVED.get(pre.prepend(slot), () -> deriver.apply(s)); + if (result) { + extend.force(s, Set::add, s); } - return vs; - }).asSet()); + return result; + } } else { - return true; + return Boolean.FALSE; } + } else if (!empty.isEmpty()) { + Set em = empty; + throw new BindingsFoundException(set.map(b -> { + Map vs = Map.of(); + for (int i = 0; i < b.length(); i++) { + Object vin = in[i]; + if (em.contains(vin)) { + vs = vs.put(vin, b.get(i)); + } + } + return vs; + }).asSet()); + } else { + return Boolean.TRUE; } } @SuppressWarnings("rawtypes") - protected final void set(S in, Boolean res, Function deriver) { - if (res && deriver == null) { - extend.force(in, Set::add, in); - set(0, in, in.toArray()); - } + protected final void set(S in) { + extend.force(in, Set::add, in); + set(0, in, in.toArray()); } private void set(int i, S in, Object[] array) { @@ -194,7 +196,7 @@ public Supplier is(O1 o1) { } public void fact(O1 o1) { - set(Single.of(o1), true, deriver); + set(Single.of(o1)); } @SuppressWarnings("unchecked") @@ -223,7 +225,7 @@ public Supplier is(O1 o1, O2 o2) { } public void fact(O1 o1, O2 o2) { - set(Pair.of(o1, o2), true, deriver); + set(Pair.of(o1, o2)); } @SuppressWarnings("unchecked") @@ -252,7 +254,7 @@ public Supplier is(O1 o1, O2 o2, O3 o3) { } public void fact(O1 o1, O2 o2, O3 o3) { - set(Triple.of(o1, o2, o3), true, deriver); + set(Triple.of(o1, o2, o3)); } @SuppressWarnings("unchecked") @@ -281,7 +283,7 @@ public Supplier is(O1 o1, O2 o2, O3 o3, O4 o4) { } public void fact(O1 o1, O2 o2, O3 o3, O4 o4) { - set(Quadruple.of(o1, o2, o3, o4), true, deriver); + set(Quadruple.of(o1, o2, o3, o4)); } @SuppressWarnings("unchecked") From 7808459219dde0e53c6da5822c1f0f0ca20fbdb4 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 13:11:34 +0100 Subject: [PATCH 076/179] Typed using Dynamic Proxies --- .../java/org/modelingvalue/dclare/Logic.java | 57 +++++++++++-- .../modelingvalue/dclare/test/LogicTest.java | 81 +++++++++++-------- 2 files changed, 99 insertions(+), 39 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index bda81c97..0c590aef 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -20,6 +20,9 @@ package org.modelingvalue.dclare; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiPredicate; import java.util.function.Function; @@ -32,7 +35,6 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.Struct; -import org.modelingvalue.collections.struct.impl.StructImpl; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.collections.util.QuadPredicate; @@ -48,14 +50,59 @@ private Logic() { @SuppressWarnings("rawtypes") private static final Context>> DERIVED = Context.of(List.of()); - public static final class Relation extends StructImpl { - private static final long serialVersionUID = -3477936037166526320L; + public static interface Variable { + } + + public static interface Thing { + } + + @SuppressWarnings("unchecked") + public static T var(Class type, String name) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Variable.class}, new DynamicClass(name)); + } - public Relation(Object... data) { - super(data); + @SuppressWarnings("unchecked") + public static T obj(Class type, String name) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Thing.class}, new DynamicClass(name)); + } + + private static final class DynamicClass implements InvocationHandler { + + private static Method EQUALS; + private static Method HASHCODE; + private static Method TO_STRING; + static { + try { + EQUALS = Object.class.getMethod("equals", Object.class); + HASHCODE = Object.class.getMethod("hashCode"); + TO_STRING = Object.class.getMethod("toString"); + } catch (NoSuchMethodException | SecurityException e) { + throw new Error(e); + } + } + + private final String name; + + public DynamicClass(String name) { + this.name = name; + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (method.equals(EQUALS)) { + return proxy == args[0] ? Boolean.TRUE : Boolean.FALSE; + } else if (method.equals(HASHCODE)) { + return Integer.valueOf(System.identityHashCode(proxy)); + } else if (method.equals(TO_STRING)) { + return name; + } else { + throw new Error("unexpected Object method dispatched: " + method); + } } } + // Functors + public static abstract class Functor { private final Constant> extend; diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index ed897d3e..febe921c 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -24,9 +24,11 @@ import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; +import java.util.concurrent.ThreadLocalRandom; import java.util.function.Supplier; import org.junit.jupiter.api.RepeatedTest; +import org.modelingvalue.collections.Collection; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -35,7 +37,8 @@ public class LogicTest { void run(Runnable test) { UniverseTransaction universeTransaction = new UniverseTransaction(Universe.of(), THE_POOL); - universeTransaction.put("test", test); + boolean seq = ThreadLocalRandom.current().nextBoolean(); + universeTransaction.put("test", seq ? Collection.sequential(test) : test); universeTransaction.stop(); universeTransaction.waitForEnd(); } @@ -48,42 +51,52 @@ static void isFalse(Supplier bs) { assertTrue(!bs.get()); } - static final Rel2 PARENT = rel2("parent"); - static final Rel2 ANCESTOR = rel2("ancestor"); - - static final String A = "A"; // Ancestor - static final String O = "O"; // Offspring - static final String R = "R"; // Relative - static { - ANCESTOR.rule(A, O, PARENT.is(A, O)); // - ANCESTOR.rule(A, O, uni(R, and(ANCESTOR.is(A, R), PARENT.is(R, O)))); - } - @RepeatedTest(1024) public void test1() { run(() -> { - PARENT.fact("Carel", "Jan"); - PARENT.fact("Jan", "Wim"); - PARENT.fact("Elske", "Wim"); - PARENT.fact("Wim", "Joppe"); - PARENT.fact("Heleen", "Joppe"); - PARENT.fact("Wim", "Marijn"); - PARENT.fact("Heleeen", "Marijn"); - - isTrue(PARENT.is("Heleen", "Joppe")); - isTrue(PARENT.is("Jan", "Wim")); - - isFalse(PARENT.is("Marijn", "Wim")); - isFalse(PARENT.is("Heleeen", "Wim")); - isFalse(PARENT.is("Wim", "Wim")); - - isTrue(ANCESTOR.is("Wim", "Marijn")); - isTrue(ANCESTOR.is("Carel", "Marijn")); - - isFalse(ANCESTOR.is("Marijn", "Wim")); - isFalse(ANCESTOR.is("Heleeen", "Wim")); - isFalse(ANCESTOR.is("Joppe", "Carel")); - isFalse(ANCESTOR.is("Carel", "Carel")); + interface Person { + } + + Rel2 PARENT = rel2("parent"); + Rel2 ANCESTOR = rel2("ancestor"); + + Person A = var(Person.class, "A"); // Ancestor + Person O = var(Person.class, "O"); // Offspring + Person R = var(Person.class, "R"); // Relative + + ANCESTOR.rule(A, O, PARENT.is(A, O)); + ANCESTOR.rule(A, O, uni(R, and(ANCESTOR.is(A, R), PARENT.is(R, O)))); + + Person Carel = obj(Person.class, "Carel"); + Person Jan = obj(Person.class, "Jan"); + Person Elske = obj(Person.class, "Elske"); + Person Wim = obj(Person.class, "Wim"); + Person Joppe = obj(Person.class, "Joppe"); + Person Heleen = obj(Person.class, "Heleen"); + Person Marijn = obj(Person.class, "Marijn"); + + PARENT.fact(Carel, Jan); + PARENT.fact(Jan, Wim); + PARENT.fact(Elske, Wim); + PARENT.fact(Wim, Joppe); + PARENT.fact(Heleen, Joppe); + PARENT.fact(Wim, Marijn); + PARENT.fact(Heleen, Marijn); + + isTrue(PARENT.is(Heleen, Joppe)); + isTrue(PARENT.is(Jan, Wim)); + + isFalse(PARENT.is(Marijn, Wim)); + isFalse(PARENT.is(Heleen, Wim)); + isFalse(PARENT.is(Wim, Wim)); + + isTrue(ANCESTOR.is(Wim, Marijn)); + isTrue(ANCESTOR.is(Carel, Marijn)); + + isFalse(ANCESTOR.is(Marijn, Wim)); + isFalse(ANCESTOR.is(Heleen, Wim)); + isFalse(ANCESTOR.is(Joppe, Carel)); + isFalse(ANCESTOR.is(Carel, Carel)); }); } } From db30e1751d7282b9b1e02f0634581323a180cd1f Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 13:20:23 +0100 Subject: [PATCH 077/179] naming example --- .../modelingvalue/dclare/test/LogicTest.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index febe921c..dd928c6a 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -57,15 +57,15 @@ public void test1() { interface Person { } - Rel2 PARENT = rel2("parent"); - Rel2 ANCESTOR = rel2("ancestor"); + Rel2 parent_child = rel2("PC"); + Rel2 ancestor_descendent = rel2("AD"); Person A = var(Person.class, "A"); // Ancestor - Person O = var(Person.class, "O"); // Offspring + Person D = var(Person.class, "D"); // Descendent Person R = var(Person.class, "R"); // Relative - ANCESTOR.rule(A, O, PARENT.is(A, O)); - ANCESTOR.rule(A, O, uni(R, and(ANCESTOR.is(A, R), PARENT.is(R, O)))); + ancestor_descendent.rule(A, D, parent_child.is(A, D)); + ancestor_descendent.rule(A, D, uni(R, and(ancestor_descendent.is(A, R), parent_child.is(R, D)))); Person Carel = obj(Person.class, "Carel"); Person Jan = obj(Person.class, "Jan"); @@ -75,28 +75,28 @@ interface Person { Person Heleen = obj(Person.class, "Heleen"); Person Marijn = obj(Person.class, "Marijn"); - PARENT.fact(Carel, Jan); - PARENT.fact(Jan, Wim); - PARENT.fact(Elske, Wim); - PARENT.fact(Wim, Joppe); - PARENT.fact(Heleen, Joppe); - PARENT.fact(Wim, Marijn); - PARENT.fact(Heleen, Marijn); + parent_child.fact(Carel, Jan); + parent_child.fact(Jan, Wim); + parent_child.fact(Elske, Wim); + parent_child.fact(Wim, Joppe); + parent_child.fact(Heleen, Joppe); + parent_child.fact(Wim, Marijn); + parent_child.fact(Heleen, Marijn); - isTrue(PARENT.is(Heleen, Joppe)); - isTrue(PARENT.is(Jan, Wim)); + isTrue(parent_child.is(Heleen, Joppe)); + isTrue(parent_child.is(Jan, Wim)); - isFalse(PARENT.is(Marijn, Wim)); - isFalse(PARENT.is(Heleen, Wim)); - isFalse(PARENT.is(Wim, Wim)); + isFalse(parent_child.is(Marijn, Wim)); + isFalse(parent_child.is(Heleen, Wim)); + isFalse(parent_child.is(Wim, Wim)); - isTrue(ANCESTOR.is(Wim, Marijn)); - isTrue(ANCESTOR.is(Carel, Marijn)); + isTrue(ancestor_descendent.is(Wim, Marijn)); + isTrue(ancestor_descendent.is(Carel, Marijn)); - isFalse(ANCESTOR.is(Marijn, Wim)); - isFalse(ANCESTOR.is(Heleen, Wim)); - isFalse(ANCESTOR.is(Joppe, Carel)); - isFalse(ANCESTOR.is(Carel, Carel)); + isFalse(ancestor_descendent.is(Marijn, Wim)); + isFalse(ancestor_descendent.is(Heleen, Wim)); + isFalse(ancestor_descendent.is(Joppe, Carel)); + isFalse(ancestor_descendent.is(Carel, Carel)); }); } } From c8878572bf9a7b4ca9f1b6fcc43c6a5dd6946021 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 14:01:41 +0100 Subject: [PATCH 078/179] First steps for support for Structers in Logic --- .../java/org/modelingvalue/dclare/Logic.java | 70 ++++++++++++++----- .../modelingvalue/dclare/test/LogicTest.java | 7 +- 2 files changed, 59 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 0c590aef..615047ef 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -35,6 +35,7 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.Struct; +import org.modelingvalue.collections.struct.impl.StructImpl; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; import org.modelingvalue.collections.util.QuadPredicate; @@ -53,24 +54,52 @@ private Logic() { public static interface Variable { } - public static interface Thing { + public static interface Relation { + } + + public static interface Relation1 extends Relation { + } + + public static interface Relation2 extends Relation { + } + + public static interface Relation3 extends Relation { + } + + public static interface Relation4 extends Relation { } @SuppressWarnings("unchecked") - public static T var(Class type, String name) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Variable.class}, new DynamicClass(name)); + public static T var(Class type, String id) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Variable.class}, new DynamicClass(id, type)); } @SuppressWarnings("unchecked") - public static T obj(Class type, String name) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Thing.class}, new DynamicClass(name)); + public static > T obj(Class type, R1 id1) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, type)); } - private static final class DynamicClass implements InvocationHandler { + @SuppressWarnings("unchecked") + public static > T obj(Class type, R1 id1, R2 id2) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, id2, type)); + } - private static Method EQUALS; - private static Method HASHCODE; - private static Method TO_STRING; + @SuppressWarnings("unchecked") + public static > T obj(Class type, R1 id1, R2 id2, R3 id3) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, id2, id3, type)); + } + + @SuppressWarnings("unchecked") + public static > T obj(Class type, R1 id1, R2 id2, R3 id3, R4 id4) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, id2, id3, id4, type)); + } + + private static final class DynamicClass extends StructImpl implements InvocationHandler { + private static final long serialVersionUID = 7315776001191198132L; + + private static final Method EQUALS; + private static final Method HASHCODE; + private static final Method TO_STRING; static { try { EQUALS = Object.class.getMethod("equals", Object.class); @@ -81,22 +110,29 @@ private static final class DynamicClass implements InvocationHandler { } } - private final String name; - - public DynamicClass(String name) { - this.name = name; + private DynamicClass(Object... id) { + super(id); } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.equals(EQUALS)) { - return proxy == args[0] ? Boolean.TRUE : Boolean.FALSE; + if (proxy == args[0]) { + return true; + } else if (args[0] == null) { + return false; + } else if (args[0].getClass() != proxy.getClass()) { + return false; + } else { + DynamicClass other = (DynamicClass) Proxy.getInvocationHandler(args[0]); + return super.equals(other); + } } else if (method.equals(HASHCODE)) { - return Integer.valueOf(System.identityHashCode(proxy)); + return super.hashCode(); } else if (method.equals(TO_STRING)) { - return name; + return super.toString(); } else { - throw new Error("unexpected Object method dispatched: " + method); + throw new Error("No handler for " + method); } } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index dd928c6a..aa409d0d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -30,6 +30,8 @@ import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.collections.Collection; import org.modelingvalue.dclare.Logic.Rel2; +import org.modelingvalue.dclare.Logic.Relation1; +import org.modelingvalue.dclare.Logic.Relation2; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -54,7 +56,10 @@ static void isFalse(Supplier bs) { @RepeatedTest(1024) public void test1() { run(() -> { - interface Person { + interface Person extends Relation1 { + } + + interface ParentChild extends Relation2 { } Rel2 parent_child = rel2("PC"); From 29e60a62e6d23f15f8baee2af65c406bacdeb729 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 16:04:42 +0100 Subject: [PATCH 079/179] more structure preparation --- .../java/org/modelingvalue/dclare/Logic.java | 115 +++++++++++++++++- .../modelingvalue/dclare/test/LogicTest.java | 83 ++++++++++--- 2 files changed, 177 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 615047ef..b7d3665b 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -55,43 +55,68 @@ public static interface Variable { } public static interface Relation { + Class type(); + } + + public static interface Relation0 extends Relation { } public static interface Relation1 extends Relation { + R1 get1(); } public static interface Relation2 extends Relation { + R1 get1(); + + R2 get2(); } public static interface Relation3 extends Relation { + R1 get1(); + + R2 get2(); + + R3 get3(); } public static interface Relation4 extends Relation { + R1 get1(); + + R2 get2(); + + R3 get3(); + + R4 get4(); } @SuppressWarnings("unchecked") public static T var(Class type, String id) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Variable.class}, new DynamicClass(id, type)); + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Variable.class}, new DynamicClass(type, id)); + } + + @SuppressWarnings("unchecked") + public static T obj(Class type) { + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type)); } @SuppressWarnings("unchecked") public static > T obj(Class type, R1 id1) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, type)); + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1)); } @SuppressWarnings("unchecked") public static > T obj(Class type, R1 id1, R2 id2) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, id2, type)); + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1, id2)); } @SuppressWarnings("unchecked") public static > T obj(Class type, R1 id1, R2 id2, R3 id3) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, id2, id3, type)); + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1, id2, id3)); } @SuppressWarnings("unchecked") public static > T obj(Class type, R1 id1, R2 id2, R3 id3, R4 id4) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(id1, id2, id3, id4, type)); + return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1, id2, id3, id4)); } private static final class DynamicClass extends StructImpl implements InvocationHandler { @@ -114,6 +139,7 @@ private DynamicClass(Object... id) { super(id); } + @SuppressWarnings({"unchecked", "rawtypes"}) @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.equals(EQUALS)) { @@ -130,13 +156,90 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } else if (method.equals(HASHCODE)) { return super.hashCode(); } else if (method.equals(TO_STRING)) { - return super.toString(); + if (proxy instanceof L) { + return list((L) proxy).toString().substring(4); + } else { + String string = super.toString(); + return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; + } + } else if (method.getName().equals("get1")) { + return super.get(1); + } else if (method.getName().equals("get2")) { + return super.get(2); + } else if (method.getName().equals("get3")) { + return super.get(3); + } else if (method.getName().equals("get4")) { + return super.get(4); + } else if (method.getName().equals("type")) { + return super.get(0); } else { throw new Error("No handler for " + method); } } } + // Facts, Rules, Is + + public interface L extends Relation { + } + + private interface EL extends L, Relation0 { + } + + private interface NEL extends L, Relation2> { + } + + @SuppressWarnings("unchecked") + public static L l(E head, L tail) { + return obj(NEL.class, head, tail); + } + + @SuppressWarnings("rawtypes") + private static final L EMPTY = obj(EL.class); + + @SuppressWarnings("unchecked") + private static List list(L l) { + List list = List.of(); + while (l instanceof NEL) { + list = list.prepend(((NEL) l).get1()); + l = ((NEL) l).get2(); + } + return list; + } + + @SuppressWarnings("unchecked") + public static L l(E... es) { + L l = EMPTY; + for (int i = es.length - 1; i >= 0; i--) { + l = l(es[i], l); + } + return l; + } + + public static interface Fact extends Relation1 { + } + + public static Fact fact(Relation rel) { + return obj(Fact.class, rel); + } + + public static interface Rule extends Relation3, L> { + } + + public static Rule rule(Relation rel, Relation... variablesPredicates) { + List list = List.of(variablesPredicates); + List variables = list.filter(r -> r instanceof Variable).asList(); + List predicates = list.filter(r -> !(r instanceof Variable)).asList(); + return obj(Rule.class, rel, l(variables.toArray(i -> new Relation[i])), l(predicates.toArray(i -> new Relation[i]))); + } + + public static interface Is extends Relation1> { + } + + public static Is is(Relation... predicates) { + return obj(Is.class, l(predicates)); + } + // Functors public static abstract class Functor { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index aa409d0d..64ab50f2 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -29,9 +29,12 @@ import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.collections.Collection; +import org.modelingvalue.dclare.Logic; +import org.modelingvalue.dclare.Logic.Is; import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Logic.Relation1; import org.modelingvalue.dclare.Logic.Relation2; +import org.modelingvalue.dclare.Logic.Rule; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -53,32 +56,82 @@ static void isFalse(Supplier bs) { assertTrue(!bs.get()); } + static void isTrue(Is is) { + } + + static void isFalse(Is is) { + } + + interface Person extends Relation1 { + } + + Person person(String name) { + return obj(Person.class, name); + } + + Person var(String name) { + return Logic.var(Person.class, name); + } + + interface ParentChild extends Relation2 { + } + + ParentChild parentChild(Person parent, Person child) { + return obj(ParentChild.class, parent, child); + } + + interface AncestorDescendent extends Relation2 { + } + + AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { + return obj(AncestorDescendent.class, ancestor, descendent); + } + @RepeatedTest(1024) - public void test1() { + public void test0() { run(() -> { - interface Person extends Relation1 { - } + Person Carel = person("Carel"); + Person Jan = person("Jan"); + Person Wim = person("Wim"); + Person Joppe = person("Joppe"); + + Person A = var("A"); // Ancestor + Person D = var("D"); // Descendent + Person R = var("R"); // Relative + + fact(parentChild(Carel, Jan)); + fact(parentChild(Jan, Wim)); + fact(parentChild(Wim, Joppe)); - interface ParentChild extends Relation2 { - } + rule(ancestorDescendent(A, D), parentChild(A, D)); + Rule r = rule(ancestorDescendent(A, D), R, ancestorDescendent(A, R), parentChild(R, D)); + isTrue(is(ancestorDescendent(Carel, Joppe))); + + isFalse(is(ancestorDescendent(Wim, Carel))); + }); + } + + @RepeatedTest(1024) + public void test1() { + run(() -> { Rel2 parent_child = rel2("PC"); Rel2 ancestor_descendent = rel2("AD"); - Person A = var(Person.class, "A"); // Ancestor - Person D = var(Person.class, "D"); // Descendent - Person R = var(Person.class, "R"); // Relative + Person A = var("A"); // Ancestor + Person D = var("D"); // Descendent + Person R = var("R"); // Relative ancestor_descendent.rule(A, D, parent_child.is(A, D)); ancestor_descendent.rule(A, D, uni(R, and(ancestor_descendent.is(A, R), parent_child.is(R, D)))); - Person Carel = obj(Person.class, "Carel"); - Person Jan = obj(Person.class, "Jan"); - Person Elske = obj(Person.class, "Elske"); - Person Wim = obj(Person.class, "Wim"); - Person Joppe = obj(Person.class, "Joppe"); - Person Heleen = obj(Person.class, "Heleen"); - Person Marijn = obj(Person.class, "Marijn"); + Person Carel = person("Carel"); + Person Jan = person("Jan"); + Person Elske = person("Elske"); + Person Wim = person("Wim"); + Person Joppe = person("Joppe"); + Person Heleen = person("Heleen"); + Person Marijn = person("Marijn"); parent_child.fact(Carel, Jan); parent_child.fact(Jan, Wim); From e27b54ca539be85b06fa6ffd724eb7c260e7fdaf Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 16:05:13 +0100 Subject: [PATCH 080/179] unused --- src/test/java/org/modelingvalue/dclare/test/LogicTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 64ab50f2..0900d0e0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -34,7 +34,6 @@ import org.modelingvalue.dclare.Logic.Rel2; import org.modelingvalue.dclare.Logic.Relation1; import org.modelingvalue.dclare.Logic.Relation2; -import org.modelingvalue.dclare.Logic.Rule; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -104,7 +103,7 @@ public void test0() { fact(parentChild(Wim, Joppe)); rule(ancestorDescendent(A, D), parentChild(A, D)); - Rule r = rule(ancestorDescendent(A, D), R, ancestorDescendent(A, R), parentChild(R, D)); + rule(ancestorDescendent(A, D), R, ancestorDescendent(A, R), parentChild(R, D)); isTrue(is(ancestorDescendent(Carel, Joppe))); From f4d98a56e9372269183ffd347af84d046ca55928 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 18 Nov 2024 16:09:46 +0100 Subject: [PATCH 081/179] switch in proxy --- .../java/org/modelingvalue/dclare/Logic.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index b7d3665b..1d934b9e 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -162,17 +162,19 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl String string = super.toString(); return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; } - } else if (method.getName().equals("get1")) { - return super.get(1); - } else if (method.getName().equals("get2")) { - return super.get(2); - } else if (method.getName().equals("get3")) { - return super.get(3); - } else if (method.getName().equals("get4")) { - return super.get(4); - } else if (method.getName().equals("type")) { - return super.get(0); } else { + switch (method.getName()) { + case "get1": + return super.get(1); + case "get2": + return super.get(2); + case "get3": + return super.get(3); + case "get4": + return super.get(4); + case "type": + return super.get(0); + } throw new Error("No handler for " + method); } } From 3e50b9ed2e3742c65259a3a29fbfa58701a40ed2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 19 Nov 2024 14:36:09 +0100 Subject: [PATCH 082/179] almost refactored --- .../java/org/modelingvalue/dclare/Logic.java | 659 ++++++++---------- .../modelingvalue/dclare/test/LogicTest.java | 101 +-- 2 files changed, 306 insertions(+), 454 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 1d934b9e..77c3d19e 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -23,10 +23,8 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.BiPredicate; -import java.util.function.Function; -import java.util.function.Predicate; import java.util.function.Supplier; import org.modelingvalue.collections.Collection; @@ -34,92 +32,24 @@ import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.struct.Struct; import org.modelingvalue.collections.struct.impl.StructImpl; import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; -import org.modelingvalue.collections.util.QuadPredicate; -import org.modelingvalue.collections.util.Quadruple; -import org.modelingvalue.collections.util.Single; -import org.modelingvalue.collections.util.TriPredicate; -import org.modelingvalue.collections.util.Triple; public final class Logic { private Logic() { } @SuppressWarnings("rawtypes") - private static final Context>> DERIVED = Context.of(List.of()); + private static final Context> DERIVED = Context.of(List.of()); - public static interface Variable { - } - - public static interface Relation { - Class type(); - } - - public static interface Relation0 extends Relation { - } - - public static interface Relation1 extends Relation { - R1 get1(); - } - - public static interface Relation2 extends Relation { - R1 get1(); - - R2 get2(); - } - - public static interface Relation3 extends Relation { - R1 get1(); - - R2 get2(); - - R3 get3(); - } - - public static interface Relation4 extends Relation { - R1 get1(); - - R2 get2(); - - R3 get3(); - - R4 get4(); - } - - @SuppressWarnings("unchecked") - public static T var(Class type, String id) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type, Variable.class}, new DynamicClass(type, id)); - } - - @SuppressWarnings("unchecked") - public static T obj(Class type) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type)); - } - - @SuppressWarnings("unchecked") - public static > T obj(Class type, R1 id1) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1)); - } - - @SuppressWarnings("unchecked") - public static > T obj(Class type, R1 id1, R2 id2) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1, id2)); - } - - @SuppressWarnings("unchecked") - public static > T obj(Class type, R1 id1, R2 id2, R3 id3) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1, id2, id3)); - } + @SuppressWarnings("rawtypes") + private static final Constant> FACTS = Constant.of("FACTS", Set.of(), CoreSetableModifier.durable); - @SuppressWarnings("unchecked") - public static > T obj(Class type, R1 id1, R2 id2, R3 id3, R4 id4) { - return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new DynamicClass(type, id1, id2, id3, id4)); - } + @SuppressWarnings("rawtypes") + private static final Constant, Set> RULES = Constant.of("RULES", Set.of(), CoreSetableModifier.durable); - private static final class DynamicClass extends StructImpl implements InvocationHandler { + private static abstract class AbstractTermImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; private static final Method EQUALS; @@ -135,10 +65,6 @@ private static final class DynamicClass extends StructImpl implements Invocation } } - private DynamicClass(Object... id) { - super(id); - } - @SuppressWarnings({"unchecked", "rawtypes"}) @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { @@ -150,123 +76,158 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } else if (args[0].getClass() != proxy.getClass()) { return false; } else { - DynamicClass other = (DynamicClass) Proxy.getInvocationHandler(args[0]); - return super.equals(other); + return super.equals(Logic.unproxy(args[0])); } } else if (method.equals(HASHCODE)) { return super.hashCode(); } else if (method.equals(TO_STRING)) { - if (proxy instanceof L) { - return list((L) proxy).toString().substring(4); - } else { - String string = super.toString(); - return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; - } + return toString(); } else { - switch (method.getName()) { - case "get1": - return super.get(1); - case "get2": - return super.get(2); - case "get3": - return super.get(3); - case "get4": - return super.get(4); - case "type": - return super.get(0); - } throw new Error("No handler for " + method); } } - } - // Facts, Rules, Is + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public String toString() { + if (functor() == L.class) { + List list = List.of(); + AbstractTermImpl ht = this; + while (ht.length() == 2) { + list = list.prepend(ht.get(1)); + ht = (AbstractTermImpl) ht.get(2); + } + return list.toString().substring(4); + } else { + String string = super.toString(); + return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; + } + } + + protected AbstractTermImpl(Class functor, Object... args) { + super(unproxy(functor, args)); + } - public interface L extends Relation { - } + @SuppressWarnings("rawtypes") + private static final Object[] unproxy(Class functor, Object[] args) { + Object[] result = new Object[args.length + 1]; + result[0] = functor; + for (int i = 0; i < args.length; i++) { + result[i + 1] = Logic.unproxy(args[i]); + } + return result; + } - private interface EL extends L, Relation0 { - } + protected abstract F proxy(); - private interface NEL extends L, Relation2> { + @SuppressWarnings("unchecked") + protected Class functor() { + return (Class) get(0); + } } - @SuppressWarnings("unchecked") - public static L l(E head, L tail) { - return obj(NEL.class, head, tail); + @SuppressWarnings("rawtypes") + private static final Object unproxy(Object object) { + if (object instanceof Term) { + return Proxy.getInvocationHandler(object); + } else { + return object; + } } @SuppressWarnings("rawtypes") - private static final L EMPTY = obj(EL.class); + private static final TermImpl unproxy(Term object) { + return (TermImpl) Proxy.getInvocationHandler(object); + } - @SuppressWarnings("unchecked") - private static List list(L l) { - List list = List.of(); - while (l instanceof NEL) { - list = list.prepend(((NEL) l).get1()); - l = ((NEL) l).get2(); - } - return list; + // Variables + + public static interface Variable { } @SuppressWarnings("unchecked") - public static L l(E... es) { - L l = EMPTY; - for (int i = es.length - 1; i >= 0; i--) { - l = l(es[i], l); - } - return l; + public static F var(Class functor, String id) { + return new VarImpl(functor, id).proxy(); } - public static interface Fact extends Relation1 { - } + private static final class VarImpl extends AbstractTermImpl { + private static final long serialVersionUID = -8998368070388908726L; - public static Fact fact(Relation rel) { - return obj(Fact.class, rel); - } + private VarImpl(Class functor, String name) { + super(functor, name); + } - public static interface Rule extends Relation3, L> { + @Override + @SuppressWarnings("unchecked") + protected final F proxy() { + return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Variable.class}, this); + } } - public static Rule rule(Relation rel, Relation... variablesPredicates) { - List list = List.of(variablesPredicates); - List variables = list.filter(r -> r instanceof Variable).asList(); - List predicates = list.filter(r -> !(r instanceof Variable)).asList(); - return obj(Rule.class, rel, l(variables.toArray(i -> new Relation[i])), l(predicates.toArray(i -> new Relation[i]))); - } + // Terms - public static interface Is extends Relation1> { + public static interface Term { } - public static Is is(Relation... predicates) { - return obj(Is.class, l(predicates)); + @SuppressWarnings("unchecked") + public static F term(Class functor, Object... args) { + return new TermImpl(functor).proxy(); } - // Functors - - public static abstract class Functor { - private final Constant> extend; + private static class TermImpl extends AbstractTermImpl implements Supplier { + private static final long serialVersionUID = -1605559565948158856L; - protected Functor(Object id) { - extend = Constant.> of(id, Set.of(), CoreSetableModifier.durable); + private TermImpl(Class functor, Object... args) { + super(functor, args); } @Override - public String toString() { - return extend.toString(); + @SuppressWarnings("unchecked") + protected F proxy() { + return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Term.class}, this); } @SuppressWarnings("rawtypes") - protected final Boolean get(Function deriver, Object... in) { + protected final void makeFact() { + FACTS.force(this, Set::add, this); + patterns(1, toArray()); + } + + private void patterns(int i, Object[] array) { + if (i < length()) { + array = array.clone(); + if (array[i] == null) { + array[i] = get(i); + FACTS.force(term(array), Set::add, this); + } + patterns(i + 1, array); + if (array[i] != null) { + array[i] = null; + FACTS.force(term(array), Set::add, this); + } + patterns(i + 1, array); + } + } + + @SuppressWarnings("unchecked") + protected TermImpl term(Object[] array) { + return new TermImpl(functor(), Arrays.copyOfRange(array, 1, array.length)); + } + + @SuppressWarnings("rawtypes") + @Override + public Boolean get() { + Set rules = RULES.get(Pair.of(functor(), length() - 1)); Set empty = Set.of(); Map vars = VARIABLES.get(); - Object[] out = in.clone(); + Object[] in = toArray(); + Object[] out = toArray(); for (int i = 0; i < in.length; i++) { while (vars.containsKey(in[i])) { Object v = vars.get(in[i]); if (v == null) { empty = empty.add(in[i]); - if (deriver == null) { + if (rules.isEmpty()) { out[i] = null; } break; @@ -276,18 +237,18 @@ protected final Boolean get(Function deriver, Object... in) { } } } - S s = struct(out); - Set set = deriver == null || empty.isEmpty() ? extend.get(s) : Set.of(); + TermImpl term = term(out); + Set set = rules.isEmpty() || empty.isEmpty() ? FACTS.get(term) : Set.of(); if (set.isEmpty()) { - if (deriver != null) { - Pair slot = Pair.of(this, s); - List> pre = DERIVED.get(); - if (pre.contains(slot)) { - throw new CircularLogicException(pre, slot); + if (!rules.isEmpty()) { + List pre = DERIVED.get(); + if (pre.contains(term)) { + throw new CircularLogicException(pre, term); } else { - Boolean result = DERIVED.get(pre.prepend(slot), () -> deriver.apply(s)); + // actualize rules + Boolean result = DERIVED.get(pre.prepend(term), any(rules)); if (result) { - extend.force(s, Set::add, s); + FACTS.force(term, Set::add, term); } return result; } @@ -310,32 +271,10 @@ protected final Boolean get(Function deriver, Object... in) { return Boolean.TRUE; } } - - @SuppressWarnings("rawtypes") - protected final void set(S in) { - extend.force(in, Set::add, in); - set(0, in, in.toArray()); - } - - private void set(int i, S in, Object[] array) { - if (i < array.length) { - array = array.clone(); - if (array[i] == null) { - array[i] = in.get(i); - extend.force(struct(array), Set::add, in); - } - set(i + 1, in, array); - if (array[i] != null) { - array[i] = null; - extend.force(struct(array), Set::add, in); - } - set(i + 1, in, array); - } - } - - protected abstract S struct(Object[] array); }; + private static final Context> VARIABLES = Context.of(Map.of()); + @SuppressWarnings("rawtypes") private static boolean run(Map vars, Supplier predicate) { Map pre = VARIABLES.get(); @@ -347,265 +286,215 @@ private static boolean run(Map vars, Supplier predicate } } - // Relations + // Rules - public static final Rel1 rel1(Object id) { - return new Rel1(id); + public static interface Rule extends Term { } - public static final Rel2 rel2(Object id) { - return new Rel2(id); + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Rule rule(Term term, Term... goals) { + RuleImpl ruleImpl = new RuleImpl(term, goal(goals)); + TermImpl termImpl = unproxy(term); + RULES.force(Pair.of(termImpl.functor(), termImpl.length() - 1), Set::add, ruleImpl); + return ruleImpl.proxy(); } - public static final Rel3 rel3(Object id) { - return new Rel3(id); - } + private static final class RuleImpl extends TermImpl { + private static final long serialVersionUID = -4602043866952049391L; - public static final Rel4 rel4(Object id) { - return new Rel4(id); - } - - public static final class Rel1 extends Functor> { - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; - - private Rel1(Object id) { - super(id); + private RuleImpl(Term term, Goal goal) { + super(Rule.class, term, goal); } - public void rule(O1 v1, Supplier p) { - rules = rules.add(o1 -> run(Map.of(Entry.of(v1, o1)), p)); - deriver = s -> any(rules.map(r -> () -> r.test(s.a()))).get(); + private RuleImpl(Object term, Object goal) { + super(Rule.class, term, goal); } + @Override @SuppressWarnings("unchecked") - public Supplier is(O1 o1) { - return () -> get(deriver, o1); + protected final Rule proxy() { + return (Rule) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{Rule.class}, this); } - public void fact(O1 o1) { - set(Single.of(o1)); + @Override + @SuppressWarnings("rawtypes") + public Boolean get() { + return ((GoalImpl) get(2)).get(); } - @SuppressWarnings("unchecked") @Override - protected Single struct(Object[] array) { - return Single.of((O1) array[0]); + @SuppressWarnings("unchecked") + protected RuleImpl term(Object[] array) { + return new RuleImpl(array[1], array[2]); } } - public static final class Rel2 extends Functor> { - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; - - private Rel2(Object id) { - super(id); - } + // Goals - public void rule(O1 v1, O2 v2, Supplier p) { - rules = rules.add((o1, o2) -> run(Map.of(Entry.of(v1, o1), Entry.of(v2, o2)), p)); - deriver = s -> any(rules.map(r -> () -> r.test(s.a(), s.b()))).get(); - } - - @SuppressWarnings("unchecked") - public Supplier is(O1 o1, O2 o2) { - return () -> get(deriver, o1, o2); - } + public static interface Goal extends Term { + } - public void fact(O1 o1, O2 o2) { - set(Pair.of(o1, o2)); - } + public static boolean is(Term... goals) { + return new GoalImpl(l(goals)).get(); + } - @SuppressWarnings("unchecked") - @Override - protected Pair struct(Object[] array) { - return Pair.of((O1) array[0], (O2) array[1]); - } + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Goal goal(Term... goals) { + return new GoalImpl(l(goals)).proxy(); } - public static final class Rel3 extends Functor> { - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; + private static final class GoalImpl extends TermImpl { + private static final long serialVersionUID = -4100263206389367132L; - private Rel3(Object id) { - super(id); + private GoalImpl(L goals) { + super(Goal.class, goals); } - public void rule(O1 v1, O2 v2, O3 v3, Supplier p) { - rules = rules.add((o1, o2, o3) -> run(Map.of(Entry.of(v1, o1), Entry.of(v2, o2), Entry.of(v3, o3)), p)); - deriver = s -> any(rules.map(r -> () -> r.test(s.a(), s.b(), s.c()))).get(); + private GoalImpl(Object goals) { + super(Goal.class, goals); } + @Override @SuppressWarnings("unchecked") - public Supplier is(O1 o1, O2 o2, O3 o3) { - return () -> get(deriver, o1, o2, o3); - } - - public void fact(O1 o1, O2 o2, O3 o3) { - set(Triple.of(o1, o2, o3)); + protected final Goal proxy() { + return (Goal) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{Goal.class}, this); } - @SuppressWarnings("unchecked") @Override - protected Triple struct(Object[] array) { - return Triple.of((O1) array[0], (O2) array[1], (O3) array[2]); - } - } - - public static final class Rel4 extends Functor> { - private Set> rules = Set.of(); - private Function, Boolean> deriver = null; - - private Rel4(Object id) { - super(id); - } - - public void rule(O1 v1, O2 v2, O3 v3, O4 v4, Supplier p) { - rules = rules.add((o1, o2, o3, o4) -> run(Map.of(Entry.of(v1, o1), Entry.of(v2, o2), Entry.of(v3, o3), Entry.of(v4, o4)), p)); - deriver = s -> any(rules.map(r -> () -> r.test(s.a(), s.b(), s.c(), s.d()))).get(); - } - @SuppressWarnings("unchecked") - public Supplier is(O1 o1, O2 o2, O3 o3, O4 o4) { - return () -> get(deriver, o1, o2, o3, o4); + protected GoalImpl term(Object[] array) { + return new GoalImpl(array[1]); } - public void fact(O1 o1, O2 o2, O3 o3, O4 o4) { - set(Quadruple.of(o1, o2, o3, o4)); - } - - @SuppressWarnings("unchecked") @Override - protected Quadruple struct(Object[] array) { - return Quadruple.of((O1) array[0], (O2) array[1], (O3) array[2], (O4) array[3]); + @SuppressWarnings("rawtypes") + public Boolean get() { + Set> set = Set.of(); + TermImpl ht = (TermImpl) get(0); + while (ht.length() == 2) { + set = set.add((TermImpl) ht.get(1)); + ht = (TermImpl) ht.get(2); + } + return uni(null, all(set)).get(); } } - // Not + // Lists - public static final Supplier not(Supplier predicate) { - return () -> !predicate.get(); + public interface L { } - // Or - - @SafeVarargs - public static final Supplier or(Supplier... predicates) { - List> list = List.of(predicates); - return list.isEmpty() ? () -> false : list.size() == 1 ? list.get(0) : () -> or(list); + @SuppressWarnings("unchecked") + public static L l(E head, L tail) { + return term(L.class, head, tail); } - public static final Supplier any(Collection> predicates) { - List> list = predicates.asList(); - return list.isEmpty() ? () -> false : list.size() == 1 ? list.get(0) : () -> or(list); - } + @SuppressWarnings("rawtypes") + private static final L EMPTY_LIST = term(L.class); - private static boolean or(List> predicates) { - List> or = predicates.random().asList(); - AtomicReference ref = new AtomicReference<>(null); - boolean result = or.anyMatch(p -> { - try { - return p.get(); - } catch (BindingsFoundException bve) { - ref.updateAndGet(rte -> { - if (rte instanceof BindingsFoundException) { - return ((BindingsFoundException) rte).merge(bve); - } else { - return rte == null || rte instanceof CycleException ? bve : rte; - } - }); - return false; - } catch (CycleException ce) { - ref.updateAndGet(rte -> rte == null ? ce : rte); - return false; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof BindingsFoundException) { - throw exc; - } else if (!result && exc != null) { - throw exc; - } else { - return result; + @SuppressWarnings("unchecked") + public static L l(E... es) { + L l = EMPTY_LIST; + for (int i = es.length - 1; i >= 0; i--) { + l = l(es[i], l); } + return l; } - // And + // Facts, Is - @SafeVarargs - public static final Supplier and(Supplier... predicates) { - List> list = List.of(predicates); - return list.isEmpty() ? () -> true : list.size() == 1 ? list.get(0) : () -> and(list); + public static void fact(Term term) { + unproxy(term).makeFact(); } - public static final Supplier all(Collection> predicates) { - List> list = predicates.asList(); - return list.isEmpty() ? () -> true : list.size() == 1 ? list.get(0) : () -> and(list); - } + // Any - private static boolean and(List> predicates) { - List> and = predicates.random().asList(); - AtomicReference ref = new AtomicReference<>(null); - boolean result = and.allMatch(p -> { - try { - return p.get(); - } catch (BindingsFoundException bve) { - ref.updateAndGet(rte -> { - if (rte instanceof BindingsFoundException) { - return ((BindingsFoundException) rte).merge(bve); - } else { - return rte == null || rte instanceof CycleException ? bve : rte; + @SuppressWarnings({"rawtypes", "unchecked"}) + private static Supplier any(Collection> terms) { + List> any = terms.random().asList(); + return () -> { + if (any.isEmpty()) { + return false; + } else if (any.size() == 1) { + return any.get(0).get(); + } else { + AtomicReference ref = new AtomicReference<>(null); + boolean result = any.anyMatch(t -> { + try { + return t.get(); + } catch (BindingsFoundException bve) { + ref.updateAndGet(rte -> { + if (rte instanceof BindingsFoundException) { + return ((BindingsFoundException) rte).merge(bve); + } else { + return rte == null || rte instanceof CycleException ? bve : rte; + } + }); + return false; + } catch (CycleException ce) { + ref.updateAndGet(rte -> rte == null ? ce : rte); + return false; } }); - return true; - } catch (CycleException ce) { - ref.updateAndGet(rte -> rte == null ? ce : rte); - return true; + RuntimeException exc = ref.get(); + if (exc instanceof BindingsFoundException) { + throw exc; + } else if (!result && exc != null) { + throw exc; + } else { + return result; + } } - }); - RuntimeException exc = ref.get(); - if (exc instanceof BindingsFoundException) { - throw exc; - } else if (result && exc != null) { - throw exc; - } else { - return result; - } + }; } - // Unification + // All - private static final Context> VARIABLES = Context.of(Map.of()); - - @SuppressWarnings("unchecked") - public static final Supplier uni(V1 v1, Supplier predicate) { - Map vars = Map.of(Entry.of(v1, null)); - return () -> doUni(vars, predicate); - } - - @SuppressWarnings("unchecked") - public static final Supplier uni(V1 v1, V2 v2, Supplier predicate) { - Map vars = Map.of(Entry.of(v1, null), Entry.of(v2, null)); - return () -> doUni(vars, predicate); - } - - @SuppressWarnings("unchecked") - public static final Supplier uni(V1 v1, V2 v2, V3 v3, Supplier predicate) { - Map vars = Map.of(Entry.of(v1, null), Entry.of(v2, null), Entry.of(v3, null)); - return () -> doUni(vars, predicate); + private static Supplier all(Collection> terms) { + List> all = terms.random().asList(); + return () -> { + if (all.isEmpty()) { + return true; + } else if (all.size() == 1) { + return all.get(0).get(); + } else { + AtomicReference ref = new AtomicReference<>(null); + boolean result = all.allMatch(p -> { + try { + return p.get(); + } catch (BindingsFoundException bve) { + ref.updateAndGet(rte -> { + if (rte instanceof BindingsFoundException) { + return ((BindingsFoundException) rte).merge(bve); + } else { + return rte == null || rte instanceof CycleException ? bve : rte; + } + }); + return true; + } catch (CycleException ce) { + ref.updateAndGet(rte -> rte == null ? ce : rte); + return true; + } + }); + RuntimeException exc = ref.get(); + if (exc instanceof BindingsFoundException) { + throw exc; + } else if (result && exc != null) { + throw exc; + } else { + return result; + } + } + }; } - @SuppressWarnings("unchecked") - public static final Supplier uni(V1 v1, V2 v2, V3 v3, V4 v4, Supplier predicate) { - Map vars = Map.of(Entry.of(v1, null), Entry.of(v2, null), Entry.of(v3, null), Entry.of(v4, null)); - return () -> doUni(vars, predicate); - } + // Unification - private static boolean doUni(Map vars, Supplier predicate) { + private static Supplier uni(Map vars, Supplier predicate) { try { - return run(vars, predicate); + return () -> run(vars, predicate); } catch (BindingsFoundException bve) { - return any(bve.bindings.map(vs -> () -> doUni(vars.putAll(vs), predicate))).get(); + return any(bve.bindings.map(vs -> uni(vars.putAll(vs), predicate))); } } @@ -646,12 +535,12 @@ public String getMessage() { @SuppressWarnings("rawtypes") public static final class CircularLogicException extends CycleException { - private static final long serialVersionUID = 293433487448006753L; + private static final long serialVersionUID = 293433487448006753L; - private final List> derived; - private final Pair current; + private final List derived; + private final TermImpl current; - private CircularLogicException(List> derived, Pair current) { + private CircularLogicException(List derived, TermImpl current) { this.derived = derived; this.current = current; } @@ -659,7 +548,7 @@ private CircularLogicException(List> derived, Pair> cycle = derived.sublist(0, i + 1).prepend(current); + List cycle = derived.sublist(0, i + 1).prepend(current); return "Circular Logic " + cycle.reverse().asList().toString().substring(4); } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 0900d0e0..fa78e7f6 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -20,20 +20,17 @@ package org.modelingvalue.dclare.test; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; import java.util.concurrent.ThreadLocalRandom; -import java.util.function.Supplier; import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.collections.Collection; import org.modelingvalue.dclare.Logic; -import org.modelingvalue.dclare.Logic.Is; -import org.modelingvalue.dclare.Logic.Rel2; -import org.modelingvalue.dclare.Logic.Relation1; -import org.modelingvalue.dclare.Logic.Relation2; +import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -47,82 +44,48 @@ void run(Runnable test) { universeTransaction.waitForEnd(); } - static void isTrue(Supplier bs) { - assertTrue(bs.get()); + static void isTrue(Term... goals) { + assertTrue(is(goals)); } - static void isFalse(Supplier bs) { - assertTrue(!bs.get()); + static void isFalse(Term... goals) { + assertFalse(is(goals)); } - static void isTrue(Is is) { - } - - static void isFalse(Is is) { - } - - interface Person extends Relation1 { + interface Person extends Term { } Person person(String name) { - return obj(Person.class, name); + return term(Person.class, name); } Person var(String name) { return Logic.var(Person.class, name); } - interface ParentChild extends Relation2 { + interface ParentChild extends Term { } ParentChild parentChild(Person parent, Person child) { - return obj(ParentChild.class, parent, child); + return term(ParentChild.class, parent, child); } - interface AncestorDescendent extends Relation2 { + interface AncestorDescendent extends Term { } AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { - return obj(AncestorDescendent.class, ancestor, descendent); + return term(AncestorDescendent.class, ancestor, descendent); } - @RepeatedTest(1024) + @RepeatedTest(1) public void test0() { run(() -> { - Person Carel = person("Carel"); - Person Jan = person("Jan"); - Person Wim = person("Wim"); - Person Joppe = person("Joppe"); - Person A = var("A"); // Ancestor Person D = var("D"); // Descendent Person R = var("R"); // Relative - fact(parentChild(Carel, Jan)); - fact(parentChild(Jan, Wim)); - fact(parentChild(Wim, Joppe)); - rule(ancestorDescendent(A, D), parentChild(A, D)); - rule(ancestorDescendent(A, D), R, ancestorDescendent(A, R), parentChild(R, D)); - - isTrue(is(ancestorDescendent(Carel, Joppe))); - - isFalse(is(ancestorDescendent(Wim, Carel))); - }); - } - - @RepeatedTest(1024) - public void test1() { - run(() -> { - Rel2 parent_child = rel2("PC"); - Rel2 ancestor_descendent = rel2("AD"); - - Person A = var("A"); // Ancestor - Person D = var("D"); // Descendent - Person R = var("R"); // Relative - - ancestor_descendent.rule(A, D, parent_child.is(A, D)); - ancestor_descendent.rule(A, D, uni(R, and(ancestor_descendent.is(A, R), parent_child.is(R, D)))); + rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); Person Carel = person("Carel"); Person Jan = person("Jan"); @@ -132,28 +95,28 @@ public void test1() { Person Heleen = person("Heleen"); Person Marijn = person("Marijn"); - parent_child.fact(Carel, Jan); - parent_child.fact(Jan, Wim); - parent_child.fact(Elske, Wim); - parent_child.fact(Wim, Joppe); - parent_child.fact(Heleen, Joppe); - parent_child.fact(Wim, Marijn); - parent_child.fact(Heleen, Marijn); + fact(parentChild(Carel, Jan)); + fact(parentChild(Jan, Wim)); + fact(parentChild(Elske, Wim)); + fact(parentChild(Wim, Joppe)); + fact(parentChild(Heleen, Joppe)); + fact(parentChild(Wim, Marijn)); + fact(parentChild(Heleen, Marijn)); - isTrue(parent_child.is(Heleen, Joppe)); - isTrue(parent_child.is(Jan, Wim)); + isTrue(parentChild(Heleen, Joppe)); + isTrue(parentChild(Jan, Wim)); - isFalse(parent_child.is(Marijn, Wim)); - isFalse(parent_child.is(Heleen, Wim)); - isFalse(parent_child.is(Wim, Wim)); + isFalse(parentChild(Marijn, Wim)); + isFalse(parentChild(Heleen, Wim)); + isFalse(parentChild(Wim, Wim)); - isTrue(ancestor_descendent.is(Wim, Marijn)); - isTrue(ancestor_descendent.is(Carel, Marijn)); + isTrue(ancestorDescendent(Wim, Marijn)); + isTrue(ancestorDescendent(Carel, Marijn)); - isFalse(ancestor_descendent.is(Marijn, Wim)); - isFalse(ancestor_descendent.is(Heleen, Wim)); - isFalse(ancestor_descendent.is(Joppe, Carel)); - isFalse(ancestor_descendent.is(Carel, Carel)); + isFalse(ancestorDescendent(Marijn, Wim)); + isFalse(ancestorDescendent(Heleen, Wim)); + isFalse(ancestorDescendent(Joppe, Carel)); + isFalse(ancestorDescendent(Carel, Carel)); }); } } From e63b467134bc67852d498bda1e57972a4be1efae Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 19 Nov 2024 17:07:35 +0100 Subject: [PATCH 083/179] structure ready --- .../java/org/modelingvalue/dclare/Logic.java | 172 +++++++++--------- 1 file changed, 87 insertions(+), 85 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 77c3d19e..67473c0e 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -25,6 +25,7 @@ import java.lang.reflect.Proxy; import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; import java.util.function.Supplier; import org.modelingvalue.collections.Collection; @@ -124,6 +125,25 @@ private static final Object[] unproxy(Class functor, Object[] args) { protected Class functor() { return (Class) get(0); } + + @SuppressWarnings({"unchecked", "rawtypes"}) + protected > R replace(Function replacer) { + Object[] array = toArray(); + boolean changed = false; + for (int i = 0; i < array.length; i++) { + Object old = array[i]; + if (array[i] instanceof AbstractTermImpl) { + array[i] = ((AbstractTermImpl) array[i]).replace(replacer); + } + array[i] = replacer.apply(array[i]); + if (old != array[i]) { + changed = true; + } + } + return (R) (changed ? term(array) : this); + } + + protected abstract AbstractTermImpl term(Object[] array); } @SuppressWarnings("rawtypes") @@ -157,11 +177,21 @@ private VarImpl(Class functor, String name) { super(functor, name); } + private VarImpl(Class functor, Object name) { + super(functor, name); + } + @Override @SuppressWarnings("unchecked") protected final F proxy() { return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Variable.class}, this); } + + @Override + @SuppressWarnings("unchecked") + protected VarImpl term(Object[] array) { + return new VarImpl(functor(), array[1]); + } } // Terms @@ -209,60 +239,46 @@ private void patterns(int i, Object[] array) { } } + @Override @SuppressWarnings("unchecked") protected TermImpl term(Object[] array) { return new TermImpl(functor(), Arrays.copyOfRange(array, 1, array.length)); } - @SuppressWarnings("rawtypes") + @SuppressWarnings({"rawtypes", "unchecked"}) @Override public Boolean get() { Set rules = RULES.get(Pair.of(functor(), length() - 1)); - Set empty = Set.of(); - Map vars = VARIABLES.get(); - Object[] in = toArray(); - Object[] out = toArray(); - for (int i = 0; i < in.length; i++) { - while (vars.containsKey(in[i])) { - Object v = vars.get(in[i]); - if (v == null) { - empty = empty.add(in[i]); - if (rules.isEmpty()) { - out[i] = null; - } - break; - } else { - out[i] = v; - in[i] = v; - } - } - } - TermImpl term = term(out); - Set set = rules.isEmpty() || empty.isEmpty() ? FACTS.get(term) : Set.of(); + TermImpl pattern = replace(e -> e instanceof VarImpl ? null : e); + Set set = rules.isEmpty() || pattern == this ? FACTS.get(pattern) : Set.of(); if (set.isEmpty()) { if (!rules.isEmpty()) { List pre = DERIVED.get(); - if (pre.contains(term)) { - throw new CircularLogicException(pre, term); + if (pre.contains(this)) { + throw new CircularLogicException(pre, this); } else { - // actualize rules - Boolean result = DERIVED.get(pre.prepend(term), any(rules)); + rules = rules.map(r -> { + List vars = r.term().variables(); + return r. replace(e -> { + int i = e instanceof VarImpl ? vars.index(e) : -1; + return i >= 0 ? get(i + 1) : e; + }); + }).asSet(); + Boolean result = DERIVED.get(pre.prepend(this), any(rules)); if (result) { - FACTS.force(term, Set::add, term); + FACTS.force(this, Set::add, this); } return result; } } else { return Boolean.FALSE; } - } else if (!empty.isEmpty()) { - Set em = empty; + } else if (pattern != this) { throw new BindingsFoundException(set.map(b -> { - Map vs = Map.of(); - for (int i = 0; i < b.length(); i++) { - Object vin = in[i]; - if (em.contains(vin)) { - vs = vs.put(vin, b.get(i)); + Map vs = Map.of(); + for (int i = 0; i < length(); i++) { + if (get(i) instanceof VarImpl) { + vs = vs.put((VarImpl) get(i), b.get(i)); } } return vs; @@ -271,20 +287,18 @@ public Boolean get() { return Boolean.TRUE; } } - }; - - private static final Context> VARIABLES = Context.of(Map.of()); - @SuppressWarnings("rawtypes") - private static boolean run(Map vars, Supplier predicate) { - Map pre = VARIABLES.get(); - Set cycle = vars.filter(kv -> kv.getValue() == null).map(Entry::getKey).filter(k -> pre.containsKey(k) && pre.get(k) == null).asSet(); - if (cycle.isEmpty()) { - return VARIABLES.get(pre.putAll(vars), predicate); - } else { - throw new CircularVariableException(cycle); + @SuppressWarnings("rawtypes") + protected List variables() { + List vars = List.of(); + for (int i = 0; i < length(); i++) { + if (get(i) instanceof VarImpl) { + vars.add((VarImpl) get(i)); + } + } + return vars; } - } + }; // Rules @@ -316,6 +330,11 @@ protected final Rule proxy() { return (Rule) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{Rule.class}, this); } + @SuppressWarnings("rawtypes") + protected final TermImpl term() { + return ((TermImpl) get(2)); + } + @Override @SuppressWarnings("rawtypes") public Boolean get() { @@ -370,12 +389,22 @@ protected GoalImpl term(Object[] array) { @SuppressWarnings("rawtypes") public Boolean get() { Set> set = Set.of(); - TermImpl ht = (TermImpl) get(0); + TermImpl ht = (TermImpl) get(1); while (ht.length() == 2) { set = set.add((TermImpl) ht.get(1)); ht = (TermImpl) ht.get(2); } - return uni(null, all(set)).get(); + return uni(variables().asMap(v -> Entry.of(v, null)), all(set)).get(); + } + + private Supplier uni(Map vars, Supplier predicate) { + return () -> { + try { + return predicate.get(); + } catch (BindingsFoundException bve) { + return any(bve.bindings.map(vs -> uni(vars.putAll(vs), predicate))).get(); + } + }; } } @@ -427,11 +456,11 @@ private static Supplier any(Collection> ter if (rte instanceof BindingsFoundException) { return ((BindingsFoundException) rte).merge(bve); } else { - return rte == null || rte instanceof CycleException ? bve : rte; + return rte == null || rte instanceof CircularLogicException ? bve : rte; } }); return false; - } catch (CycleException ce) { + } catch (CircularLogicException ce) { ref.updateAndGet(rte -> rte == null ? ce : rte); return false; } @@ -467,11 +496,11 @@ private static Supplier all(Collection> ter if (rte instanceof BindingsFoundException) { return ((BindingsFoundException) rte).merge(bve); } else { - return rte == null || rte instanceof CycleException ? bve : rte; + return rte == null || rte instanceof CircularLogicException ? bve : rte; } }); return true; - } catch (CycleException ce) { + } catch (CircularLogicException ce) { ref.updateAndGet(rte -> rte == null ? ce : rte); return true; } @@ -488,24 +517,16 @@ private static Supplier all(Collection> ter }; } - // Unification - - private static Supplier uni(Map vars, Supplier predicate) { - try { - return () -> run(vars, predicate); - } catch (BindingsFoundException bve) { - return any(bve.bindings.map(vs -> uni(vars.putAll(vs), predicate))); - } - } - // Runtime Exceptions public static final class BindingsFoundException extends RuntimeException { - private static final long serialVersionUID = 4505117271488648346L; + private static final long serialVersionUID = 4505117271488648346L; - private final Set> bindings; + @SuppressWarnings("rawtypes") + private final Set> bindings; - private BindingsFoundException(Set> bindings) { + @SuppressWarnings("rawtypes") + private BindingsFoundException(Set> bindings) { this.bindings = bindings; } @@ -514,27 +535,8 @@ private BindingsFoundException merge(BindingsFoundException other) { } } - private static abstract class CycleException extends RuntimeException { - private static final long serialVersionUID = -1561492438458671302L; - } - - public static final class CircularVariableException extends CycleException { - private static final long serialVersionUID = 1636584651815799600L; - - private final Set vars; - - private CircularVariableException(Set vars) { - this.vars = vars; - } - - @Override - public String getMessage() { - return "Circular Variables " + vars.toString().substring(3); - } - } - @SuppressWarnings("rawtypes") - public static final class CircularLogicException extends CycleException { + public static final class CircularLogicException extends RuntimeException { private static final long serialVersionUID = 293433487448006753L; private final List derived; From 17e5b1456a429a797d32499fee7b24ed33c6d8d2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 19 Nov 2024 17:48:43 +0100 Subject: [PATCH 084/179] better --- .../java/org/modelingvalue/dclare/Logic.java | 168 +++++++++--------- 1 file changed, 85 insertions(+), 83 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 67473c0e..bb593fa8 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -29,7 +29,6 @@ import java.util.function.Supplier; import org.modelingvalue.collections.Collection; -import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; @@ -254,17 +253,17 @@ public Boolean get() { if (set.isEmpty()) { if (!rules.isEmpty()) { List pre = DERIVED.get(); - if (pre.contains(this)) { - throw new CircularLogicException(pre, this); + if (pre.contains(pattern)) { + throw new CircularLogicException(pre, pattern); } else { - rules = rules.map(r -> { + Set bound = rules.map(r -> { List vars = r.term().variables(); return r. replace(e -> { int i = e instanceof VarImpl ? vars.index(e) : -1; return i >= 0 ? get(i + 1) : e; }); }).asSet(); - Boolean result = DERIVED.get(pre.prepend(this), any(rules)); + Boolean result = DERIVED.get(pre.prepend(pattern), () -> any(bound)); if (result) { FACTS.force(this, Set::add, this); } @@ -385,26 +384,33 @@ protected GoalImpl term(Object[] array) { return new GoalImpl(array[1]); } - @Override @SuppressWarnings("rawtypes") + @Override public Boolean get() { + try { + return all(goals()); + } catch (BindingsFoundException bve) { + return any(bve.bindings.map(b -> replace(e -> { + if (e instanceof VarImpl) { + Object v = b.get((VarImpl) e); + if (v != null) { + return v; + } + } + return e; + }))); + } + } + + @SuppressWarnings("rawtypes") + private Set> goals() { Set> set = Set.of(); TermImpl ht = (TermImpl) get(1); while (ht.length() == 2) { set = set.add((TermImpl) ht.get(1)); ht = (TermImpl) ht.get(2); } - return uni(variables().asMap(v -> Entry.of(v, null)), all(set)).get(); - } - - private Supplier uni(Map vars, Supplier predicate) { - return () -> { - try { - return predicate.get(); - } catch (BindingsFoundException bve) { - return any(bve.bindings.map(vs -> uni(vars.putAll(vs), predicate))).get(); - } - }; + return set; } } @@ -439,82 +445,78 @@ public static void fact(Term term) { // Any @SuppressWarnings({"rawtypes", "unchecked"}) - private static Supplier any(Collection> terms) { + private static Boolean any(Collection> terms) { List> any = terms.random().asList(); - return () -> { - if (any.isEmpty()) { - return false; - } else if (any.size() == 1) { - return any.get(0).get(); - } else { - AtomicReference ref = new AtomicReference<>(null); - boolean result = any.anyMatch(t -> { - try { - return t.get(); - } catch (BindingsFoundException bve) { - ref.updateAndGet(rte -> { - if (rte instanceof BindingsFoundException) { - return ((BindingsFoundException) rte).merge(bve); - } else { - return rte == null || rte instanceof CircularLogicException ? bve : rte; - } - }); - return false; - } catch (CircularLogicException ce) { - ref.updateAndGet(rte -> rte == null ? ce : rte); - return false; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof BindingsFoundException) { - throw exc; - } else if (!result && exc != null) { - throw exc; - } else { - return result; + if (any.isEmpty()) { + return false; + } else if (any.size() == 1) { + return any.get(0).get(); + } else { + AtomicReference ref = new AtomicReference<>(null); + boolean result = any.anyMatch(t -> { + try { + return t.get(); + } catch (BindingsFoundException bve) { + ref.updateAndGet(rte -> { + if (rte instanceof BindingsFoundException) { + return ((BindingsFoundException) rte).merge(bve); + } else { + return rte == null || rte instanceof CircularLogicException ? bve : rte; + } + }); + return false; + } catch (CircularLogicException ce) { + ref.updateAndGet(rte -> rte == null ? ce : rte); + return false; } + }); + RuntimeException exc = ref.get(); + if (exc instanceof BindingsFoundException) { + throw exc; + } else if (!result && exc != null) { + throw exc; + } else { + return result; } - }; + } } // All - private static Supplier all(Collection> terms) { + private static Boolean all(Collection> terms) { List> all = terms.random().asList(); - return () -> { - if (all.isEmpty()) { - return true; - } else if (all.size() == 1) { - return all.get(0).get(); - } else { - AtomicReference ref = new AtomicReference<>(null); - boolean result = all.allMatch(p -> { - try { - return p.get(); - } catch (BindingsFoundException bve) { - ref.updateAndGet(rte -> { - if (rte instanceof BindingsFoundException) { - return ((BindingsFoundException) rte).merge(bve); - } else { - return rte == null || rte instanceof CircularLogicException ? bve : rte; - } - }); - return true; - } catch (CircularLogicException ce) { - ref.updateAndGet(rte -> rte == null ? ce : rte); - return true; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof BindingsFoundException) { - throw exc; - } else if (result && exc != null) { - throw exc; - } else { - return result; + if (all.isEmpty()) { + return true; + } else if (all.size() == 1) { + return all.get(0).get(); + } else { + AtomicReference ref = new AtomicReference<>(null); + boolean result = all.allMatch(p -> { + try { + return p.get(); + } catch (BindingsFoundException bve) { + ref.updateAndGet(rte -> { + if (rte instanceof BindingsFoundException) { + return ((BindingsFoundException) rte).merge(bve); + } else { + return rte == null || rte instanceof CircularLogicException ? bve : rte; + } + }); + return true; + } catch (CircularLogicException ce) { + ref.updateAndGet(rte -> rte == null ? ce : rte); + return true; } + }); + RuntimeException exc = ref.get(); + if (exc instanceof BindingsFoundException) { + throw exc; + } else if (result && exc != null) { + throw exc; + } else { + return result; } - }; + } } // Runtime Exceptions From 9e103aa7a8488a5550a5efabf077e6f6fd0abe87 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 22 Nov 2024 14:39:23 +0100 Subject: [PATCH 085/179] cleanup --- .../java/org/modelingvalue/dclare/Logic.java | 349 +++++++----------- .../modelingvalue/dclare/test/LogicTest.java | 28 ++ 2 files changed, 152 insertions(+), 225 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index bb593fa8..79a37af9 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -24,11 +24,11 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Arrays; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; +import java.util.function.BiFunction; import java.util.function.Supplier; import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; @@ -41,15 +41,26 @@ private Logic() { } @SuppressWarnings("rawtypes") - private static final Context> DERIVED = Context.of(List.of()); + private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); + + private static final BiFunction, RuleImpl, Set> ADD_RULE = (s, e) -> s == null ? Set.of(e) : s.add(e); + + @SuppressWarnings("rawtypes") + private static final Context> DERIVED = Context.of(List.of()); + + @SuppressWarnings("rawtypes") + private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); + + @SuppressWarnings("rawtypes") + private static final Constant, Set> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", Set.of(), CoreSetableModifier.durable); + private static final Pair, Collection>> EMPTY = Pair.of(Set.of(), Set.of()); @SuppressWarnings("rawtypes") - private static final Constant, Set> RULES = Constant.of("RULES", Set.of(), CoreSetableModifier.durable); + private static final Pair>, Collection>> EMPTY_VARS = Pair.of(Set.of(), Set.of()); - private static abstract class AbstractTermImpl extends StructImpl implements InvocationHandler { + private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; private static final Method EQUALS; @@ -92,10 +103,10 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl public String toString() { if (functor() == L.class) { List list = List.of(); - AbstractTermImpl ht = this; - while (ht.length() == 2) { + ClauseImpl ht = this; + while (ht.length() == 3) { list = list.prepend(ht.get(1)); - ht = (AbstractTermImpl) ht.get(2); + ht = (ClauseImpl) ht.get(2); } return list.toString().substring(4); } else { @@ -104,7 +115,7 @@ public String toString() { } } - protected AbstractTermImpl(Class functor, Object... args) { + protected ClauseImpl(Class functor, Object... args) { super(unproxy(functor, args)); } @@ -125,24 +136,7 @@ protected Class functor() { return (Class) get(0); } - @SuppressWarnings({"unchecked", "rawtypes"}) - protected > R replace(Function replacer) { - Object[] array = toArray(); - boolean changed = false; - for (int i = 0; i < array.length; i++) { - Object old = array[i]; - if (array[i] instanceof AbstractTermImpl) { - array[i] = ((AbstractTermImpl) array[i]).replace(replacer); - } - array[i] = replacer.apply(array[i]); - if (old != array[i]) { - changed = true; - } - } - return (R) (changed ? term(array) : this); - } - - protected abstract AbstractTermImpl term(Object[] array); + protected abstract ClauseImpl term(Object[] array); } @SuppressWarnings("rawtypes") @@ -169,7 +163,7 @@ public static F var(Class functor, String id) { return new VarImpl(functor, id).proxy(); } - private static final class VarImpl extends AbstractTermImpl { + private static final class VarImpl extends ClauseImpl { private static final long serialVersionUID = -8998368070388908726L; private VarImpl(Class functor, String name) { @@ -186,6 +180,11 @@ protected final F proxy() { return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Variable.class}, this); } + @Override + public String toString() { + return get(1).toString(); + } + @Override @SuppressWarnings("unchecked") protected VarImpl term(Object[] array) { @@ -200,10 +199,10 @@ public static interface Term { @SuppressWarnings("unchecked") public static F term(Class functor, Object... args) { - return new TermImpl(functor).proxy(); + return new TermImpl(functor, args).proxy(); } - private static class TermImpl extends AbstractTermImpl implements Supplier { + private static class TermImpl extends ClauseImpl { private static final long serialVersionUID = -1605559565948158856L; private TermImpl(Class functor, Object... args) { @@ -216,9 +215,15 @@ protected F proxy() { return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Term.class}, this); } + @Override + @SuppressWarnings("unchecked") + protected TermImpl term(Object[] array) { + return new TermImpl((Class) array[0], Arrays.copyOfRange(array, 1, array.length)); + } + @SuppressWarnings("rawtypes") protected final void makeFact() { - FACTS.force(this, Set::add, this); + FACTS.force(this, ADD_FACT, this); patterns(1, toArray()); } @@ -227,76 +232,88 @@ private void patterns(int i, Object[] array) { array = array.clone(); if (array[i] == null) { array[i] = get(i); - FACTS.force(term(array), Set::add, this); + FACTS.force(term(array), ADD_FACT, this); } patterns(i + 1, array); if (array[i] != null) { array[i] = null; - FACTS.force(term(array), Set::add, this); + FACTS.force(term(array), ADD_FACT, this); } patterns(i + 1, array); } } - @Override - @SuppressWarnings("unchecked") - protected TermImpl term(Object[] array) { - return new TermImpl(functor(), Arrays.copyOfRange(array, 1, array.length)); + @SuppressWarnings({"rawtypes", "unchecked"}) + protected Set variables() { + Set vars = Set.of(); + for (int i = 0; i < length(); i++) { + if (get(i) instanceof VarImpl) { + vars = vars.add((VarImpl) get(i)); + } + } + return vars; + } + + @SuppressWarnings("rawtypes") + protected Map getBinding(TermImpl term) { + Map vars = Map.of(); + for (int i = 1; i < length(); i++) { + if (get(i) instanceof VarImpl) { + vars = vars.put((VarImpl) get(i), term.get(i)); + } + } + return vars; + } + + @SuppressWarnings("rawtypes") + protected TermImpl setBinding(Map vars) { + Object[] array = toArray(); + for (int i = 1; i < length(); i++) { + if (get(i) instanceof VarImpl) { + array[i] = vars.get((VarImpl) get(i)); + } + } + return term(array); } @SuppressWarnings({"rawtypes", "unchecked"}) - @Override - public Boolean get() { - Set rules = RULES.get(Pair.of(functor(), length() - 1)); - TermImpl pattern = replace(e -> e instanceof VarImpl ? null : e); - Set set = rules.isEmpty() || pattern == this ? FACTS.get(pattern) : Set.of(); - if (set.isEmpty()) { - if (!rules.isEmpty()) { + protected Pair, Collection>> match() { + Set facts = FACTS.get(this); + if (facts == null) { + Set rules = RULES.get(Pair.of(functor(), length() - 1)); + if (rules != null) { List pre = DERIVED.get(); - if (pre.contains(pattern)) { - throw new CircularLogicException(pre, pattern); + if (pre.contains(this)) { + return Pair.of(Set.of(), Set.of(() -> { + int i = pre.firstIndexOf(this); + List cycle = pre.sublist(0, i + 1).prepend(this); + return "Circular Logic " + cycle.reverse().asList().toString().substring(4); + })); } else { - Set bound = rules.map(r -> { - List vars = r.term().variables(); - return r. replace(e -> { - int i = e instanceof VarImpl ? vars.index(e) : -1; - return i >= 0 ? get(i + 1) : e; - }); - }).asSet(); - Boolean result = DERIVED.get(pre.prepend(pattern), () -> any(bound)); - if (result) { - FACTS.force(this, Set::add, this); + List post = pre.prepend(this); + Pair, Collection>> result = DERIVED.get(post, () -> { + Pair, Collection>> r = EMPTY; + for (RuleImpl rule : rules) { + Pair, Collection>> e = rule.eval(this); + r = Pair.of(Collection.concat(r.a(), e.a()), Collection.concat(r.b(), e.b())); + } + return r; + }); + if (result.b().isEmpty()) { + facts = result.a().asSet(); + FACTS.force(this, facts); + return Pair.of(facts, Set.of()); + } else { + return result; } - return result; } } else { - return Boolean.FALSE; + return EMPTY; } - } else if (pattern != this) { - throw new BindingsFoundException(set.map(b -> { - Map vs = Map.of(); - for (int i = 0; i < length(); i++) { - if (get(i) instanceof VarImpl) { - vs = vs.put((VarImpl) get(i), b.get(i)); - } - } - return vs; - }).asSet()); } else { - return Boolean.TRUE; + return Pair.of(facts, Set.of()); } } - - @SuppressWarnings("rawtypes") - protected List variables() { - List vars = List.of(); - for (int i = 0; i < length(); i++) { - if (get(i) instanceof VarImpl) { - vars.add((VarImpl) get(i)); - } - } - return vars; - } }; // Rules @@ -308,7 +325,7 @@ public static interface Rule extends Term { public static Rule rule(Term term, Term... goals) { RuleImpl ruleImpl = new RuleImpl(term, goal(goals)); TermImpl termImpl = unproxy(term); - RULES.force(Pair.of(termImpl.functor(), termImpl.length() - 1), Set::add, ruleImpl); + RULES.force(Pair.of(termImpl.functor(), termImpl.length() - 1), ADD_RULE, ruleImpl); return ruleImpl.proxy(); } @@ -331,13 +348,19 @@ protected final Rule proxy() { @SuppressWarnings("rawtypes") protected final TermImpl term() { - return ((TermImpl) get(2)); + return ((TermImpl) get(1)); } - @Override @SuppressWarnings("rawtypes") - public Boolean get() { - return ((GoalImpl) get(2)).get(); + protected final GoalImpl goal() { + return ((GoalImpl) get(2)); + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + protected Pair, Collection>> eval(TermImpl ptrn) { + TermImpl head = term(); + Pair>, Collection>> result = goal().eval(head.getBinding(ptrn)); + return Pair.of(result.a().map(m -> head.setBinding(m)), result.b()); } @Override @@ -353,7 +376,9 @@ public static interface Goal extends Term { } public static boolean is(Term... goals) { - return new GoalImpl(l(goals)).get(); + @SuppressWarnings("rawtypes") + Pair>, Collection>> result = new GoalImpl(l(goals)).eval(); + return result.b().isEmpty() && !result.a().isEmpty(); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -385,32 +410,21 @@ protected GoalImpl term(Object[] array) { } @SuppressWarnings("rawtypes") - @Override - public Boolean get() { - try { - return all(goals()); - } catch (BindingsFoundException bve) { - return any(bve.bindings.map(b -> replace(e -> { - if (e instanceof VarImpl) { - Object v = b.get((VarImpl) e); - if (v != null) { - return v; - } - } - return e; - }))); - } + public Pair>, Collection>> eval() { + return eval(variables().asMap(v -> Entry.of(v, null))); } - @SuppressWarnings("rawtypes") - private Set> goals() { - Set> set = Set.of(); - TermImpl ht = (TermImpl) get(1); - while (ht.length() == 2) { - set = set.add((TermImpl) ht.get(1)); - ht = (TermImpl) ht.get(2); + @SuppressWarnings({"rawtypes", "unchecked"}) + protected Pair>, Collection>> eval(Map vars) { + Pair>, Collection>> r = EMPTY_VARS; + TermImpl list = (TermImpl) get(1); + while (list.length() == 3) { + TermImpl goal = (TermImpl) list.get(1); + Pair, Collection>> e = goal.setBinding(vars).match(); + r = Pair.of(Collection.concat(r.a(), e.a().map(m -> goal.getBinding(m))), Collection.concat(r.b(), e.b())); + list = (TermImpl) list.get(2); } - return set; + return r; } } @@ -442,119 +456,4 @@ public static void fact(Term term) { unproxy(term).makeFact(); } - // Any - - @SuppressWarnings({"rawtypes", "unchecked"}) - private static Boolean any(Collection> terms) { - List> any = terms.random().asList(); - if (any.isEmpty()) { - return false; - } else if (any.size() == 1) { - return any.get(0).get(); - } else { - AtomicReference ref = new AtomicReference<>(null); - boolean result = any.anyMatch(t -> { - try { - return t.get(); - } catch (BindingsFoundException bve) { - ref.updateAndGet(rte -> { - if (rte instanceof BindingsFoundException) { - return ((BindingsFoundException) rte).merge(bve); - } else { - return rte == null || rte instanceof CircularLogicException ? bve : rte; - } - }); - return false; - } catch (CircularLogicException ce) { - ref.updateAndGet(rte -> rte == null ? ce : rte); - return false; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof BindingsFoundException) { - throw exc; - } else if (!result && exc != null) { - throw exc; - } else { - return result; - } - } - } - - // All - - private static Boolean all(Collection> terms) { - List> all = terms.random().asList(); - if (all.isEmpty()) { - return true; - } else if (all.size() == 1) { - return all.get(0).get(); - } else { - AtomicReference ref = new AtomicReference<>(null); - boolean result = all.allMatch(p -> { - try { - return p.get(); - } catch (BindingsFoundException bve) { - ref.updateAndGet(rte -> { - if (rte instanceof BindingsFoundException) { - return ((BindingsFoundException) rte).merge(bve); - } else { - return rte == null || rte instanceof CircularLogicException ? bve : rte; - } - }); - return true; - } catch (CircularLogicException ce) { - ref.updateAndGet(rte -> rte == null ? ce : rte); - return true; - } - }); - RuntimeException exc = ref.get(); - if (exc instanceof BindingsFoundException) { - throw exc; - } else if (result && exc != null) { - throw exc; - } else { - return result; - } - } - } - - // Runtime Exceptions - - public static final class BindingsFoundException extends RuntimeException { - private static final long serialVersionUID = 4505117271488648346L; - - @SuppressWarnings("rawtypes") - private final Set> bindings; - - @SuppressWarnings("rawtypes") - private BindingsFoundException(Set> bindings) { - this.bindings = bindings; - } - - private BindingsFoundException merge(BindingsFoundException other) { - return new BindingsFoundException(bindings.addAll(other.bindings)); - } - } - - @SuppressWarnings("rawtypes") - public static final class CircularLogicException extends RuntimeException { - private static final long serialVersionUID = 293433487448006753L; - - private final List derived; - private final TermImpl current; - - private CircularLogicException(List derived, TermImpl current) { - this.derived = derived; - this.current = current; - } - - @Override - public String getMessage() { - int i = derived.firstIndexOf(current); - List cycle = derived.sublist(0, i + 1).prepend(current); - return "Circular Logic " + cycle.reverse().asList().toString().substring(4); - } - } - } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index fa78e7f6..f8def999 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -119,4 +119,32 @@ public void test0() { isFalse(ancestorDescendent(Carel, Carel)); }); } + + @RepeatedTest(1) + public void test1() { + run(() -> { + Person A = var("A"); // Ancestor + Person D = var("D"); // Descendent + Person R = var("R"); // Relative + + rule(ancestorDescendent(A, D), parentChild(A, D)); + rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); + + Person Carel = person("Carel"); + Person Jan = person("Jan"); + Person Wim = person("Wim"); + + fact(parentChild(Carel, Jan)); + fact(parentChild(Jan, Wim)); + + isTrue(parentChild(Carel, Jan)); + isTrue(parentChild(Jan, Wim)); + + isFalse(parentChild(Jan, Carel)); + isFalse(parentChild(Wim, Wim)); + + isTrue(ancestorDescendent(Carel, Jan)); + isTrue(ancestorDescendent(Carel, Wim)); + }); + } } From 5d7c9d0531548ba1099c5b5ef1f0aa1ae4bee4b6 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sat, 23 Nov 2024 13:18:33 +0100 Subject: [PATCH 086/179] simplified --- .../java/org/modelingvalue/dclare/Logic.java | 119 +++++++++--------- 1 file changed, 62 insertions(+), 57 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 79a37af9..72fab3d8 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -25,10 +25,8 @@ import java.lang.reflect.Proxy; import java.util.Arrays; import java.util.function.BiFunction; -import java.util.function.Supplier; import org.modelingvalue.collections.Collection; -import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; @@ -41,24 +39,18 @@ private Logic() { } @SuppressWarnings("rawtypes") - private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); + private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); - private static final BiFunction, RuleImpl, Set> ADD_RULE = (s, e) -> s == null ? Set.of(e) : s.add(e); + private static final BiFunction, RuleImpl, Set> ADD_RULE = (s, e) -> s == null ? Set.of(e) : s.add(e); @SuppressWarnings("rawtypes") - private static final Context> DERIVED = Context.of(List.of()); + private static final Context> DERIVED = Context.of(List.of()); @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); + private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant, Set> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); - - @SuppressWarnings("rawtypes") - private static final Pair, Collection>> EMPTY = Pair.of(Set.of(), Set.of()); - - @SuppressWarnings("rawtypes") - private static final Pair>, Collection>> EMPTY_VARS = Pair.of(Set.of(), Set.of()); + private static final Constant, Set> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; @@ -148,9 +140,9 @@ private static final Object unproxy(Object object) { } } - @SuppressWarnings("rawtypes") - private static final TermImpl unproxy(Term object) { - return (TermImpl) Proxy.getInvocationHandler(object); + @SuppressWarnings("unchecked") + private static final TermImpl unproxy(T object) { + return (TermImpl) Proxy.getInvocationHandler(object); } // Variables @@ -244,11 +236,13 @@ private void patterns(int i, Object[] array) { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Set variables() { - Set vars = Set.of(); - for (int i = 0; i < length(); i++) { + protected Map variables() { + Map vars = Map.of(); + for (int i = 1; i < length(); i++) { if (get(i) instanceof VarImpl) { - vars = vars.add((VarImpl) get(i)); + vars = vars.put((VarImpl) get(i), null); + } else if (get(i) instanceof TermImpl) { + vars = vars.putAll(((TermImpl) get(i)).variables()); } } return vars; @@ -277,41 +271,28 @@ protected TermImpl setBinding(Map vars) { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Pair, Collection>> match() { + protected Collection match() { Set facts = FACTS.get(this); if (facts == null) { Set rules = RULES.get(Pair.of(functor(), length() - 1)); if (rules != null) { List pre = DERIVED.get(); if (pre.contains(this)) { - return Pair.of(Set.of(), Set.of(() -> { - int i = pre.firstIndexOf(this); - List cycle = pre.sublist(0, i + 1).prepend(this); - return "Circular Logic " + cycle.reverse().asList().toString().substring(4); - })); + return Set.of(INCOMPLETE); } else { - List post = pre.prepend(this); - Pair, Collection>> result = DERIVED.get(post, () -> { - Pair, Collection>> r = EMPTY; + return DERIVED.get(pre.prepend(this), () -> { + Collection r = Set.of(); for (RuleImpl rule : rules) { - Pair, Collection>> e = rule.eval(this); - r = Pair.of(Collection.concat(r.a(), e.a()), Collection.concat(r.b(), e.b())); + r = Collection.concat(r, rule.eval(this)); } return r; }); - if (result.b().isEmpty()) { - facts = result.a().asSet(); - FACTS.force(this, facts); - return Pair.of(facts, Set.of()); - } else { - return result; - } } } else { - return EMPTY; + return Set.of(); } } else { - return Pair.of(facts, Set.of()); + return facts; } } }; @@ -357,10 +338,10 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Pair, Collection>> eval(TermImpl ptrn) { + protected Collection eval(TermImpl ptrn) { TermImpl head = term(); - Pair>, Collection>> result = goal().eval(head.getBinding(ptrn)); - return Pair.of(result.a().map(m -> head.setBinding(m)), result.b()); + Collection> r = goal().eval(variables().putAll(head.getBinding(ptrn))); + return r.map(m -> head.setBinding(m)); } @Override @@ -376,14 +357,12 @@ public static interface Goal extends Term { } public static boolean is(Term... goals) { - @SuppressWarnings("rawtypes") - Pair>, Collection>> result = new GoalImpl(l(goals)).eval(); - return result.b().isEmpty() && !result.a().isEmpty(); + return new GoalImpl(list(goals)).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); } @SuppressWarnings({"unchecked", "rawtypes"}) public static Goal goal(Term... goals) { - return new GoalImpl(l(goals)).proxy(); + return new GoalImpl(list(goals)).proxy(); } private static final class GoalImpl extends TermImpl { @@ -410,24 +389,45 @@ protected GoalImpl term(Object[] array) { } @SuppressWarnings("rawtypes") - public Pair>, Collection>> eval() { - return eval(variables().asMap(v -> Entry.of(v, null))); + public Collection> eval() { + return eval(variables()); } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Pair>, Collection>> eval(Map vars) { - Pair>, Collection>> r = EMPTY_VARS; + protected Collection> eval(Map vars) { + Collection> r = Set.of(vars); TermImpl list = (TermImpl) get(1); while (list.length() == 3) { TermImpl goal = (TermImpl) list.get(1); - Pair, Collection>> e = goal.setBinding(vars).match(); - r = Pair.of(Collection.concat(r.a(), e.a().map(m -> goal.getBinding(m))), Collection.concat(r.b(), e.b())); + r = r.flatMap(vs -> { + Collection ts = goal.setBinding(vs).match(); + Collection> ms = ts.map(t -> vs.putAll(goal.getBinding(t))); + return ms; + }); list = (TermImpl) list.get(2); } return r; } } + // Incomplete + + public interface Incomplete { + } + + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); + private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); + + @SuppressWarnings("unchecked") + public static Incomplete incomplete() { + return INCOMPLETE.proxy(); + } + + @SuppressWarnings("unchecked") + public static Incomplete incompleteVar() { + return INCOMPLETE_VAR.proxy(); + } + // Lists public interface L { @@ -439,13 +439,18 @@ public static L l(E head, L tail) { } @SuppressWarnings("rawtypes") - private static final L EMPTY_LIST = term(L.class); + private static final TermImpl EMPTY_LIST = new TermImpl(L.class); - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "rawtypes"}) public static L l(E... es) { - L l = EMPTY_LIST; + return list(es).proxy(); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static TermImpl list(E... es) { + TermImpl l = EMPTY_LIST; for (int i = es.length - 1; i >= 0; i--) { - l = l(es[i], l); + l = new TermImpl(L.class, unproxy(es[i]), l); } return l; } From 9c83cef3f769917da2fbfc42cfb4334ec13a9cf5 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sun, 24 Nov 2024 13:26:49 +0100 Subject: [PATCH 087/179] working --- .../java/org/modelingvalue/dclare/Logic.java | 141 +++++++++++++----- .../modelingvalue/dclare/test/LogicTest.java | 4 +- 2 files changed, 109 insertions(+), 36 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 72fab3d8..cd1f0e76 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -26,7 +26,7 @@ import java.util.Arrays; import java.util.function.BiFunction; -import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; @@ -250,28 +250,36 @@ protected Map variables() { @SuppressWarnings("rawtypes") protected Map getBinding(TermImpl term) { - Map vars = Map.of(); - for (int i = 1; i < length(); i++) { - if (get(i) instanceof VarImpl) { - vars = vars.put((VarImpl) get(i), term.get(i)); + if (term == INCOMPLETE) { + return INCOMPLETE_MAP; + } else { + Map vars = Map.of(); + for (int i = 1; i < length(); i++) { + if (get(i) instanceof VarImpl) { + vars = vars.put((VarImpl) get(i), term.get(i)); + } } + return vars; } - return vars; } @SuppressWarnings("rawtypes") - protected TermImpl setBinding(Map vars) { - Object[] array = toArray(); - for (int i = 1; i < length(); i++) { - if (get(i) instanceof VarImpl) { - array[i] = vars.get((VarImpl) get(i)); + protected TermImpl setBinding(Map vars) { + if (vars == INCOMPLETE_MAP) { + return INCOMPLETE; + } else { + Object[] array = toArray(); + for (int i = 1; i < length(); i++) { + if (get(i) instanceof VarImpl) { + array[i] = vars.get((VarImpl) get(i)); + } } + return term(array); } - return term(array); } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection match() { + protected Set match() { Set facts = FACTS.get(this); if (facts == null) { Set rules = RULES.get(Pair.of(functor(), length() - 1)); @@ -280,13 +288,15 @@ protected Collection match() { if (pre.contains(this)) { return Set.of(INCOMPLETE); } else { - return DERIVED.get(pre.prepend(this), () -> { - Collection r = Set.of(); - for (RuleImpl rule : rules) { - r = Collection.concat(r, rule.eval(this)); + Set result = DERIVED.get(pre.prepend(this), () -> { + Set r = Set.of(); + for (RuleImpl rule : rules.random()) { + r = r.addAll(rule.eval(this)); } return r; }); + FACTS.force(this, result); + return result; } } else { return Set.of(); @@ -295,6 +305,41 @@ protected Collection match() { return facts; } } + + @SuppressWarnings("rawtypes") + protected int prio() { + Set facts = FACTS.get(this); + if (facts != null) { + return Integer.MIN_VALUE + facts.size(); + } else { + Set rules = RULES.get(Pair.of(functor(), length() - 1)); + if (rules != null) { + return nrOfNulls(); + } + } + return Integer.MIN_VALUE; + } + + @SuppressWarnings("rawtypes") + protected List list() { + List l = List.of(); + TermImpl t = this; + while (t.length() == 3) { + l = l.add((TermImpl) t.get(1)); + t = (TermImpl) t.get(2); + } + return l; + } + + protected int nrOfNulls() { + int nr = 0; + for (int i = 1; i < length(); i++) { + if (get(i) == null) { + nr++; + } + } + return nr; + } }; // Rules @@ -338,10 +383,10 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection eval(TermImpl ptrn) { + protected Set eval(TermImpl ptrn) { TermImpl head = term(); - Collection> r = goal().eval(variables().putAll(head.getBinding(ptrn))); - return r.map(m -> head.setBinding(m)); + Set> r = goal().eval(variables().putAll(head.getBinding(ptrn))); + return r.map(m -> head.setBinding(m)).asSet(); } @Override @@ -389,24 +434,50 @@ protected GoalImpl term(Object[] array) { } @SuppressWarnings("rawtypes") - public Collection> eval() { + public Set> eval() { return eval(variables()); } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection> eval(Map vars) { - Collection> r = Set.of(vars); - TermImpl list = (TermImpl) get(1); - while (list.length() == 3) { - TermImpl goal = (TermImpl) list.get(1); - r = r.flatMap(vs -> { - Collection ts = goal.setBinding(vs).match(); - Collection> ms = ts.map(t -> vs.putAll(goal.getBinding(t))); - return ms; - }); - list = (TermImpl) list.get(2); + protected Set> eval(Map vars) { + List list = ((TermImpl) get(1)).list(); + return eval(list, list, Set.of(vars)); + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + private Set> eval(List goals, List actual, Set> vars) { + if (goals.isEmpty()) { + return vars; + } else { + return vars.> flatMap(v -> { + List b = actual; + for (int i = 0; i < goals.size(); i++) { + b = b.replace(i, goals.get(i).setBinding(v)); + } + TermImpl f = first(b); + int i = b.index(f); + TermImpl g = goals.get(i); + Set m = f.match(); + return eval(goals.removeIndex(i), b.removeIndex(i), m.map(t -> { + Map pa = v.putAll(g.getBinding(t)); + return pa; + }).asSet()); + }).asSet(); + } + } + + @SuppressWarnings("rawtypes") + private static TermImpl first(List list) { + TermImpl first = null; + int min = Integer.MAX_VALUE; + for (TermImpl t : list) { + int prio = t.prio(); + if (first == null || prio < min) { + first = t; + min = prio; + } } - return r; + return first; } } @@ -415,8 +486,10 @@ protected Collection> eval(Map vars) { public interface Incomplete { } - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); + @SuppressWarnings("rawtypes") + private static final Map INCOMPLETE_MAP = Map.of(Entry.of(INCOMPLETE_VAR, INCOMPLETE)); @SuppressWarnings("unchecked") public static Incomplete incomplete() { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index f8def999..b9f91ecc 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -77,7 +77,7 @@ AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { return term(AncestorDescendent.class, ancestor, descendent); } - @RepeatedTest(1) + @RepeatedTest(10) public void test0() { run(() -> { Person A = var("A"); // Ancestor @@ -120,7 +120,7 @@ public void test0() { }); } - @RepeatedTest(1) + @RepeatedTest(10) public void test1() { run(() -> { Person A = var("A"); // Ancestor From 122c1f1d179b9045d8c9664c5cf4c3816bdd73ac Mon Sep 17 00:00:00 2001 From: WimBast Date: Sun, 24 Nov 2024 13:36:10 +0100 Subject: [PATCH 088/179] simplification --- .../java/org/modelingvalue/dclare/Logic.java | 29 +++++++++---------- .../modelingvalue/dclare/test/LogicTest.java | 4 +-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index cd1f0e76..b9cb0aff 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -440,25 +440,24 @@ public Set> eval() { @SuppressWarnings({"rawtypes", "unchecked"}) protected Set> eval(Map vars) { - List list = ((TermImpl) get(1)).list(); - return eval(list, list, Set.of(vars)); + return eval(((TermImpl) get(1)).list(), Set.of(vars)); } @SuppressWarnings({"rawtypes", "unchecked"}) - private Set> eval(List goals, List actual, Set> vars) { + private Set> eval(List goals, Set> vars) { if (goals.isEmpty()) { return vars; } else { return vars.> flatMap(v -> { - List b = actual; - for (int i = 0; i < goals.size(); i++) { - b = b.replace(i, goals.get(i).setBinding(v)); + List actual = List.of(); + for (TermImpl g : goals) { + actual = actual.add(g.setBinding(v)); } - TermImpl f = first(b); - int i = b.index(f); + int i = first(actual); + TermImpl f = actual.get(i); TermImpl g = goals.get(i); Set m = f.match(); - return eval(goals.removeIndex(i), b.removeIndex(i), m.map(t -> { + return eval(goals.removeIndex(i), m.map(t -> { Map pa = v.putAll(g.getBinding(t)); return pa; }).asSet()); @@ -467,13 +466,13 @@ private Set> eval(List goals, List actu } @SuppressWarnings("rawtypes") - private static TermImpl first(List list) { - TermImpl first = null; + private static int first(List list) { + int first = -1; int min = Integer.MAX_VALUE; - for (TermImpl t : list) { - int prio = t.prio(); - if (first == null || prio < min) { - first = t; + for (int i = 0; i < list.size(); i++) { + int prio = list.get(i).prio(); + if (first == -1 || prio < min) { + first = i; min = prio; } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index b9f91ecc..e7c9181b 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -77,7 +77,7 @@ AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { return term(AncestorDescendent.class, ancestor, descendent); } - @RepeatedTest(10) + @RepeatedTest(100) public void test0() { run(() -> { Person A = var("A"); // Ancestor @@ -120,7 +120,7 @@ public void test0() { }); } - @RepeatedTest(10) + @RepeatedTest(100) public void test1() { run(() -> { Person A = var("A"); // Ancestor From 56e23a7a61d84d9fae802cc6d5fdb4b7f2dd07e3 Mon Sep 17 00:00:00 2001 From: WimBast Date: Sun, 24 Nov 2024 13:44:47 +0100 Subject: [PATCH 089/179] lazy Collections --- .../java/org/modelingvalue/dclare/Logic.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index b9cb0aff..09cc6fec 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -26,6 +26,7 @@ import java.util.Arrays; import java.util.function.BiFunction; +import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.List; import org.modelingvalue.collections.Map; @@ -279,7 +280,7 @@ protected TermImpl setBinding(Map vars) { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Set match() { + protected Collection match() { Set facts = FACTS.get(this); if (facts == null) { Set rules = RULES.get(Pair.of(functor(), length() - 1)); @@ -288,14 +289,14 @@ protected Set match() { if (pre.contains(this)) { return Set.of(INCOMPLETE); } else { - Set result = DERIVED.get(pre.prepend(this), () -> { - Set r = Set.of(); - for (RuleImpl rule : rules.random()) { - r = r.addAll(rule.eval(this)); + Collection result = DERIVED.get(pre.prepend(this), () -> { + Collection r = Set.of(); + for (RuleImpl rule : rules) { + r = Collection.concat(r, rule.eval(this)); } return r; }); - FACTS.force(this, result); + // FACTS.force(this, result); return result; } } else { @@ -383,10 +384,10 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Set eval(TermImpl ptrn) { + protected Collection eval(TermImpl ptrn) { TermImpl head = term(); - Set> r = goal().eval(variables().putAll(head.getBinding(ptrn))); - return r.map(m -> head.setBinding(m)).asSet(); + Collection> r = goal().eval(variables().putAll(head.getBinding(ptrn))); + return r.map(m -> head.setBinding(m)); } @Override @@ -434,17 +435,17 @@ protected GoalImpl term(Object[] array) { } @SuppressWarnings("rawtypes") - public Set> eval() { + public Collection> eval() { return eval(variables()); } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Set> eval(Map vars) { + protected Collection> eval(Map vars) { return eval(((TermImpl) get(1)).list(), Set.of(vars)); } @SuppressWarnings({"rawtypes", "unchecked"}) - private Set> eval(List goals, Set> vars) { + private Collection> eval(List goals, Collection> vars) { if (goals.isEmpty()) { return vars; } else { @@ -456,12 +457,12 @@ private Set> eval(List goals, Set m = f.match(); + Collection m = f.match(); return eval(goals.removeIndex(i), m.map(t -> { Map pa = v.putAll(g.getBinding(t)); return pa; - }).asSet()); - }).asSet(); + })); + }); } } From 18e11442ed68adff16aa697d40ec22dda143e89a Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 10:54:59 +0100 Subject: [PATCH 090/179] pre order rules --- .../java/org/modelingvalue/dclare/Logic.java | 65 ++++++++++++++----- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 09cc6fec..5bccb556 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -40,18 +40,30 @@ private Logic() { } @SuppressWarnings("rawtypes") - private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); - - private static final BiFunction, RuleImpl, Set> ADD_RULE = (s, e) -> s == null ? Set.of(e) : s.add(e); + private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); + + private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { + if (l == null) { + return List.of(e); + } else { + int p = e.rulePrio(); + for (int i = 0; i < l.size(); i++) { + if (l.get(i).rulePrio() > p) { + return l.insert(i, e); + } + } + return l.append(e); + } + }; @SuppressWarnings("rawtypes") - private static final Context> DERIVED = Context.of(List.of()); + private static final Context> DERIVED = Context.of(List.of()); @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); + private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant, Set> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); + private static final Constant, List> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; @@ -283,21 +295,35 @@ protected TermImpl setBinding(Map vars) { protected Collection match() { Set facts = FACTS.get(this); if (facts == null) { - Set rules = RULES.get(Pair.of(functor(), length() - 1)); + List rules = RULES.get(Pair.of(functor(), length() - 1)); if (rules != null) { List pre = DERIVED.get(); if (pre.contains(this)) { return Set.of(INCOMPLETE); } else { + int non = nrOfNulls(); Collection result = DERIVED.get(pre.prepend(this), () -> { Collection r = Set.of(); for (RuleImpl rule : rules) { - r = Collection.concat(r, rule.eval(this)); + Collection eval = rule.eval(this); + if (non == 0) { + Set set = eval.asSet(); + if (!set.isEmpty()) { + return set; + } + } else { + r = Collection.concat(r, eval); + } } return r; }); - // FACTS.force(this, result); - return result; + if (non == 0 || (non == 1 && length() > 1)) { + Set set = result.asSet(); + FACTS.force(this, set); + return set; + } else { + return result; + } } } else { return Set.of(); @@ -308,12 +334,12 @@ protected Collection match() { } @SuppressWarnings("rawtypes") - protected int prio() { + protected int termPrio() { Set facts = FACTS.get(this); if (facts != null) { return Integer.MIN_VALUE + facts.size(); } else { - Set rules = RULES.get(Pair.of(functor(), length() - 1)); + List rules = RULES.get(Pair.of(functor(), length() - 1)); if (rules != null) { return nrOfNulls(); } @@ -395,6 +421,10 @@ protected Collection eval(TermImpl ptrn) { protected RuleImpl term(Object[] array) { return new RuleImpl(array[1], array[2]); } + + protected int rulePrio() { + return goal().goals().size(); + } } // Goals @@ -439,9 +469,14 @@ public Collection> eval() { return eval(variables()); } - @SuppressWarnings({"rawtypes", "unchecked"}) + @SuppressWarnings("rawtypes") protected Collection> eval(Map vars) { - return eval(((TermImpl) get(1)).list(), Set.of(vars)); + return eval(goals(), Set.of(vars)); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + protected List goals() { + return ((TermImpl) get(1)).list(); } @SuppressWarnings({"rawtypes", "unchecked"}) @@ -471,7 +506,7 @@ private static int first(List list) { int first = -1; int min = Integer.MAX_VALUE; for (int i = 0; i < list.size(); i++) { - int prio = list.get(i).prio(); + int prio = list.get(i).termPrio(); if (first == -1 || prio < min) { first = i; min = prio; From 27d9a294310e3d836028986837c6e9e61f016b44 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 11:08:49 +0100 Subject: [PATCH 091/179] no extend --- .../java/org/modelingvalue/dclare/Logic.java | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 5bccb556..31bf1ad7 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -229,22 +229,24 @@ protected TermImpl term(Object[] array) { @SuppressWarnings("rawtypes") protected final void makeFact() { FACTS.force(this, ADD_FACT, this); - patterns(1, toArray()); + patterns(1, toArray(), true); } - private void patterns(int i, Object[] array) { + private void patterns(int i, Object[] array, boolean empty) { if (i < length()) { array = array.clone(); if (array[i] == null) { array[i] = get(i); FACTS.force(term(array), ADD_FACT, this); } - patterns(i + 1, array); + patterns(i + 1, array, false); if (array[i] != null) { array[i] = null; - FACTS.force(term(array), ADD_FACT, this); + if (!empty || i < length() - 1) { + FACTS.force(term(array), ADD_FACT, this); + } } - patterns(i + 1, array); + patterns(i + 1, array, empty); } } @@ -299,30 +301,34 @@ protected Collection match() { if (rules != null) { List pre = DERIVED.get(); if (pre.contains(this)) { - return Set.of(INCOMPLETE); + return INCOMPLETE_SET; } else { int non = nrOfNulls(); - Collection result = DERIVED.get(pre.prepend(this), () -> { - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this); - if (non == 0) { - Set set = eval.asSet(); - if (!set.isEmpty()) { - return set; + if (non == length()) { + return INCOMPLETE_SET; + } else { + Collection result = DERIVED.get(pre.prepend(this), () -> { + Collection r = Set.of(); + for (RuleImpl rule : rules) { + Collection eval = rule.eval(this); + if (non == 0) { + Set set = eval.asSet(); + if (!set.isEmpty()) { + return set; + } + } else { + r = Collection.concat(r, eval); } - } else { - r = Collection.concat(r, eval); } + return r; + }); + if (non < 2) { + Set set = result.asSet(); + FACTS.force(this, set); + return set; + } else { + return result; } - return r; - }); - if (non == 0 || (non == 1 && length() > 1)) { - Set set = result.asSet(); - FACTS.force(this, set); - return set; - } else { - return result; } } } else { @@ -522,6 +528,7 @@ public interface Incomplete { } private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); + private static final Set INCOMPLETE_SET = Set.of(INCOMPLETE); private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); @SuppressWarnings("rawtypes") private static final Map INCOMPLETE_MAP = Map.of(Entry.of(INCOMPLETE_VAR, INCOMPLETE)); From 211b8088e2713a5f2bff6d2b45552f1203b10ff5 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 11:09:33 +0100 Subject: [PATCH 092/179] warning --- src/main/java/org/modelingvalue/dclare/Logic.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 31bf1ad7..051bd310 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -528,6 +528,7 @@ public interface Incomplete { } private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); + @SuppressWarnings("rawtypes") private static final Set INCOMPLETE_SET = Set.of(INCOMPLETE); private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); @SuppressWarnings("rawtypes") From 02169cbc9e43617b1ea10b6498077ecb90559417 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 15:38:55 +0100 Subject: [PATCH 093/179] INCOMPLETE handling --- .../dclare/ActionTransaction.java | 1 - .../java/org/modelingvalue/dclare/Logic.java | 164 ++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 34 +++- 3 files changed, 122 insertions(+), 77 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 473a8dc3..56a8b4dd 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -46,7 +46,6 @@ public class ActionTransaction extends LeafTransaction implements StateMergeHand public void changed(O object, Setable setable, T preValue, T rawPreValue, T postValue) { ActionTransaction.this.changed(object, setable, preValue, rawPreValue, postValue); if (setable.id() instanceof Observed) { - // LeafTransaction.getCurrent().runSilent(() -> System.err.println("PULL " + object + "." + setable + "=" + postValue)); ActionTransaction.this.set(object, (Observed) setable.id(), preValue, postValue); } } diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 051bd310..42ed949b 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -32,7 +32,6 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; -import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.Pair; public final class Logic { @@ -56,9 +55,6 @@ private Logic() { } }; - @SuppressWarnings("rawtypes") - private static final Context> DERIVED = Context.of(List.of()); - @SuppressWarnings("rawtypes") private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @@ -103,23 +99,6 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } } - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public String toString() { - if (functor() == L.class) { - List list = List.of(); - ClauseImpl ht = this; - while (ht.length() == 3) { - list = list.prepend(ht.get(1)); - ht = (ClauseImpl) ht.get(2); - } - return list.toString().substring(4); - } else { - String string = super.toString(); - return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; - } - } - protected ClauseImpl(Class functor, Object... args) { super(unproxy(functor, args)); } @@ -158,6 +137,15 @@ private static final TermImpl unproxy(T object) { return (TermImpl) Proxy.getInvocationHandler(object); } + @SuppressWarnings("rawtypes") + private static final Object proxy(Object object) { + if (object instanceof ClauseImpl) { + return ((ClauseImpl) object).proxy(); + } else { + return object; + } + } + // Variables public static interface Variable { @@ -226,6 +214,17 @@ protected TermImpl term(Object[] array) { return new TermImpl((Class) array[0], Arrays.copyOfRange(array, 1, array.length)); } + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public String toString() { + if (functor() == L.class) { + return list().toString().substring(4); + } else { + String string = super.toString(); + return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; + } + } + @SuppressWarnings("rawtypes") protected final void makeFact() { FACTS.force(this, ADD_FACT, this); @@ -265,7 +264,7 @@ protected Map variables() { @SuppressWarnings("rawtypes") protected Map getBinding(TermImpl term) { - if (term == INCOMPLETE) { + if (term.equals(INCOMPLETE)) { return INCOMPLETE_MAP; } else { Map vars = Map.of(); @@ -280,7 +279,7 @@ protected Map getBinding(TermImpl term) { @SuppressWarnings("rawtypes") protected TermImpl setBinding(Map vars) { - if (vars == INCOMPLETE_MAP) { + if (vars.containsKey(INCOMPLETE_VAR)) { return INCOMPLETE; } else { Object[] array = toArray(); @@ -294,40 +293,37 @@ protected TermImpl setBinding(Map vars) { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection match() { + protected Collection match(List der) { Set facts = FACTS.get(this); if (facts == null) { List rules = RULES.get(Pair.of(functor(), length() - 1)); if (rules != null) { - List pre = DERIVED.get(); - if (pre.contains(this)) { + if (der.contains(this)) { return INCOMPLETE_SET; } else { int non = nrOfNulls(); - if (non == length()) { + if (non == length() - 1) { return INCOMPLETE_SET; } else { - Collection result = DERIVED.get(pre.prepend(this), () -> { - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this); - if (non == 0) { - Set set = eval.asSet(); - if (!set.isEmpty()) { - return set; - } - } else { - r = Collection.concat(r, eval); + der = der.prepend(this); + Collection r = Set.of(); + for (RuleImpl rule : rules) { + Collection eval = rule.eval(this, der); + if (non == 0) { + Set set = eval.asSet(); + if (!set.isEmpty()) { + return set; } + } else { + r = Collection.concat(r, eval); } - return r; - }); + } if (non < 2) { - Set set = result.asSet(); + Set set = r.asSet(); FACTS.force(this, set); return set; } else { - return result; + return r; } } } @@ -340,17 +336,26 @@ protected Collection match() { } @SuppressWarnings("rawtypes") - protected int termPrio() { - Set facts = FACTS.get(this); - if (facts != null) { - return Integer.MIN_VALUE + facts.size(); + protected int termPrio(List der) { + int non = nrOfNulls(); + if (non == length() - 1) { + return Integer.MAX_VALUE; } else { - List rules = RULES.get(Pair.of(functor(), length() - 1)); - if (rules != null) { - return nrOfNulls(); + Set facts = FACTS.get(this); + if (facts != null) { + return Integer.MIN_VALUE + facts.size(); + } else { + List rules = RULES.get(Pair.of(functor(), length() - 1)); + if (rules != null) { + if (der.contains(this)) { + return Integer.MAX_VALUE; + } else { + return non; + } + } } + return Integer.MIN_VALUE; } - return Integer.MIN_VALUE; } @SuppressWarnings("rawtypes") @@ -416,9 +421,9 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection eval(TermImpl ptrn) { + protected Collection eval(TermImpl ptrn, List der) { TermImpl head = term(); - Collection> r = goal().eval(variables().putAll(head.getBinding(ptrn))); + Collection> r = goal().eval(variables().putAll(head.getBinding(ptrn)), der); return r.map(m -> head.setBinding(m)); } @@ -442,6 +447,11 @@ public static boolean is(Term... goals) { return new GoalImpl(list(goals)).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); } + @SuppressWarnings("rawtypes") + public static Set> eval(Term... goals) { + return new GoalImpl(list(goals)).eval().map(m -> m.asMap(e -> Entry.of((Variable) e.getKey().proxy(), proxy(e.getValue())))).asSet(); + } + @SuppressWarnings({"unchecked", "rawtypes"}) public static Goal goal(Term... goals) { return new GoalImpl(list(goals)).proxy(); @@ -472,12 +482,12 @@ protected GoalImpl term(Object[] array) { @SuppressWarnings("rawtypes") public Collection> eval() { - return eval(variables()); + return eval(variables(), List.of()); } @SuppressWarnings("rawtypes") - protected Collection> eval(Map vars) { - return eval(goals(), Set.of(vars)); + protected Collection> eval(Map vars, List der) { + return eval(goals(), Set.of(vars), der); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -486,33 +496,37 @@ protected List goals() { } @SuppressWarnings({"rawtypes", "unchecked"}) - private Collection> eval(List goals, Collection> vars) { + private Collection> eval(List goals, Collection> vars, List der) { if (goals.isEmpty()) { return vars; } else { return vars.> flatMap(v -> { - List actual = List.of(); - for (TermImpl g : goals) { - actual = actual.add(g.setBinding(v)); + if (v.containsKey(INCOMPLETE_VAR)) { + return INCOMPLETE_MAP_SET; + } else { + List actual = List.of(); + for (TermImpl g : goals) { + actual = actual.add(g.setBinding(v)); + } + int i = first(actual, der); + TermImpl f = actual.get(i); + TermImpl g = goals.get(i); + Collection m = f.match(der); + return eval(goals.removeIndex(i), m.map(t -> { + Map b = g.getBinding(t); + return b == INCOMPLETE_MAP ? b : v.putAll(b); + }), der); } - int i = first(actual); - TermImpl f = actual.get(i); - TermImpl g = goals.get(i); - Collection m = f.match(); - return eval(goals.removeIndex(i), m.map(t -> { - Map pa = v.putAll(g.getBinding(t)); - return pa; - })); }); } } - @SuppressWarnings("rawtypes") - private static int first(List list) { + @SuppressWarnings({"rawtypes", "unchecked"}) + private static int first(List list, List der) { int first = -1; int min = Integer.MAX_VALUE; for (int i = 0; i < list.size(); i++) { - int prio = list.get(i).termPrio(); + int prio = list.get(i).termPrio(der); if (first == -1 || prio < min) { first = i; min = prio; @@ -527,12 +541,14 @@ private static int first(List list) { public interface Incomplete { } - private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); + private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); + @SuppressWarnings("rawtypes") + private static final Set INCOMPLETE_SET = Set.of(INCOMPLETE); + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); @SuppressWarnings("rawtypes") - private static final Set INCOMPLETE_SET = Set.of(INCOMPLETE); - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); + private static final Map INCOMPLETE_MAP = Map.of(Entry.of(INCOMPLETE_VAR, INCOMPLETE)); @SuppressWarnings("rawtypes") - private static final Map INCOMPLETE_MAP = Map.of(Entry.of(INCOMPLETE_VAR, INCOMPLETE)); + private static final Set> INCOMPLETE_MAP_SET = Set.of(INCOMPLETE_MAP); @SuppressWarnings("unchecked") public static Incomplete incomplete() { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index e7c9181b..870dcd5d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -20,8 +20,7 @@ package org.modelingvalue.dclare.test; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; @@ -29,6 +28,9 @@ import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.collections.Collection; +import org.modelingvalue.collections.Entry; +import org.modelingvalue.collections.Map; +import org.modelingvalue.collections.Set; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Universe; @@ -52,6 +54,10 @@ static void isFalse(Term... goals) { assertFalse(is(goals)); } + static void hasResult(Set> bindings, Term... goals) { + assertEquals(bindings, eval(goals)); + } + interface Person extends Term { } @@ -147,4 +153,28 @@ public void test1() { isTrue(ancestorDescendent(Carel, Wim)); }); } + + @RepeatedTest(1) + public void test2() { + run(() -> { + Person A = var("A"); // Ancestor + Person D = var("D"); // Descendent + Person R = var("R"); // Relative + + rule(ancestorDescendent(A, D), parentChild(A, D)); + rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); + // rule(ancestorDescendent(A, D), parentChild(A, R), ancestorDescendent(R, D)); + + Person Carel = person("Carel"); + Person Jan = person("Jan"); + Person Wim = person("Wim"); + + fact(parentChild(Carel, Jan)); + fact(parentChild(Jan, Wim)); + + hasResult(Set.of(Map.of(Entry.of(A, Jan)), Map.of(Entry.of(A, Carel))), ancestorDescendent(A, Wim)); + hasResult(Set.of(Map.of(Entry.of(D, Jan)), Map.of(Entry.of(D, Wim))), ancestorDescendent(Carel, D)); + }); + } + } From 195d95cb22bbc0cfdb213279f74b8ba63fad420a Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 16:03:22 +0100 Subject: [PATCH 094/179] Test Universe fix. --- src/main/java/org/modelingvalue/dclare/Universe.java | 12 ++++++------ .../org/modelingvalue/dclare/test/LogicTest.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index f5cbf152..815852d4 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -44,12 +44,12 @@ static Universe of(Feature... features) { return new Universe() { private final MutableClass universeClass = new MutableClass() { - @SuppressWarnings("unchecked") - Set> observers = // - (Set>) Collection.of(features).filter(Observer.class).asSet(); - @SuppressWarnings("unchecked") - Set> setables = // - (Set>) Collection.of(features).filter(Setable.class).asSet(); + @SuppressWarnings({"unchecked", "rawtypes"}) + Set> observers = // + (Set) Collection.of(features).filter(Observer.class).asSet(); + @SuppressWarnings({"unchecked", "rawtypes"}) + Set> setables = // + (Set) Collection.of(features).filter(Setable.class).asSet(); @Override public Set> dObservers() { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 870dcd5d..aa630ed0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -154,7 +154,7 @@ public void test1() { }); } - @RepeatedTest(1) + //@RepeatedTest(1) public void test2() { run(() -> { Person A = var("A"); // Ancestor From 441bf2b82ea80776e81573ef27e035240fbcad1e Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 16:11:29 +0100 Subject: [PATCH 095/179] fix --- .../java/org/modelingvalue/dclare/Logic.java | 73 ++++++++----------- .../modelingvalue/dclare/test/LogicTest.java | 3 +- 2 files changed, 32 insertions(+), 44 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 42ed949b..9d8c8938 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -228,24 +228,22 @@ public String toString() { @SuppressWarnings("rawtypes") protected final void makeFact() { FACTS.force(this, ADD_FACT, this); - patterns(1, toArray(), true); + patterns(1, toArray()); } - private void patterns(int i, Object[] array, boolean empty) { + private void patterns(int i, Object[] array) { if (i < length()) { array = array.clone(); if (array[i] == null) { array[i] = get(i); FACTS.force(term(array), ADD_FACT, this); } - patterns(i + 1, array, false); + patterns(i + 1, array); if (array[i] != null) { array[i] = null; - if (!empty || i < length() - 1) { - FACTS.force(term(array), ADD_FACT, this); - } + FACTS.force(term(array), ADD_FACT, this); } - patterns(i + 1, array, empty); + patterns(i + 1, array); } } @@ -302,30 +300,26 @@ protected Collection match(List der) { return INCOMPLETE_SET; } else { int non = nrOfNulls(); - if (non == length() - 1) { - return INCOMPLETE_SET; - } else { - der = der.prepend(this); - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this, der); - if (non == 0) { - Set set = eval.asSet(); - if (!set.isEmpty()) { - return set; - } - } else { - r = Collection.concat(r, eval); + der = der.prepend(this); + Collection r = Set.of(); + for (RuleImpl rule : rules) { + Collection eval = rule.eval(this, der); + if (non == 0) { + Set set = eval.asSet(); + if (!set.isEmpty()) { + return set; } - } - if (non < 2) { - Set set = r.asSet(); - FACTS.force(this, set); - return set; } else { - return r; + r = Collection.concat(r, eval); } } + if (non < 2 && non < length() - 1) { + Set set = r.asSet(); + FACTS.force(this, set); + return set; + } else { + return r; + } } } else { return Set.of(); @@ -337,25 +331,20 @@ protected Collection match(List der) { @SuppressWarnings("rawtypes") protected int termPrio(List der) { - int non = nrOfNulls(); - if (non == length() - 1) { - return Integer.MAX_VALUE; + Set facts = FACTS.get(this); + if (facts != null) { + return Integer.MIN_VALUE + facts.size(); } else { - Set facts = FACTS.get(this); - if (facts != null) { - return Integer.MIN_VALUE + facts.size(); - } else { - List rules = RULES.get(Pair.of(functor(), length() - 1)); - if (rules != null) { - if (der.contains(this)) { - return Integer.MAX_VALUE; - } else { - return non; - } + List rules = RULES.get(Pair.of(functor(), length() - 1)); + if (rules != null) { + if (der.contains(this)) { + return Integer.MAX_VALUE; + } else { + return nrOfNulls(); } } - return Integer.MIN_VALUE; } + return Integer.MIN_VALUE; } @SuppressWarnings("rawtypes") diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index aa630ed0..0c7f48d5 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -154,7 +154,7 @@ public void test1() { }); } - //@RepeatedTest(1) + @RepeatedTest(100) public void test2() { run(() -> { Person A = var("A"); // Ancestor @@ -163,7 +163,6 @@ public void test2() { rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); - // rule(ancestorDescendent(A, D), parentChild(A, R), ancestorDescendent(R, D)); Person Carel = person("Carel"); Person Jan = person("Jan"); From 7753091a34101b327fcf14667520e4bf777f1648 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 25 Nov 2024 17:01:19 +0100 Subject: [PATCH 096/179] bind utility --- src/main/java/org/modelingvalue/dclare/Logic.java | 11 +++++++++++ .../java/org/modelingvalue/dclare/test/LogicTest.java | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 9d8c8938..d7c33c3e 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -582,4 +582,15 @@ public static void fact(Term term) { unproxy(term).makeFact(); } + // Variable bindings + + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Map bind(Term... varVal) { + Map b = Map.of(); + for (int i = 0; i < varVal.length; i += 2) { + b = b.add(Entry.of((Variable) varVal[i], varVal[i + 1])); + } + return b; + } + } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 0c7f48d5..7728dd09 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -28,11 +28,11 @@ import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.collections.Collection; -import org.modelingvalue.collections.Entry; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Term; +import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -54,7 +54,7 @@ static void isFalse(Term... goals) { assertFalse(is(goals)); } - static void hasResult(Set> bindings, Term... goals) { + static void hasResult(Set> bindings, Term... goals) { assertEquals(bindings, eval(goals)); } @@ -171,8 +171,8 @@ public void test2() { fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); - hasResult(Set.of(Map.of(Entry.of(A, Jan)), Map.of(Entry.of(A, Carel))), ancestorDescendent(A, Wim)); - hasResult(Set.of(Map.of(Entry.of(D, Jan)), Map.of(Entry.of(D, Wim))), ancestorDescendent(Carel, D)); + hasResult(Set.of(bind(A, Jan), bind(A, Carel)), ancestorDescendent(A, Wim)); + hasResult(Set.of(bind(D, Jan), bind(D, Wim)), ancestorDescendent(Carel, D)); }); } From 4f23331b897981249a0a439686c8a36ec4c9225d Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Nov 2024 09:37:03 +0100 Subject: [PATCH 097/179] incomplete info and optional EXTEND usage --- .../java/org/modelingvalue/dclare/Logic.java | 185 ++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 21 +- 2 files changed, 124 insertions(+), 82 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index d7c33c3e..2656f062 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -38,28 +38,30 @@ public final class Logic { private Logic() { } + private static final boolean USE_EXTEND = Boolean.getBoolean("USE_EXTEND"); + @SuppressWarnings("rawtypes") - private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); - - private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { - if (l == null) { - return List.of(e); - } else { - int p = e.rulePrio(); - for (int i = 0; i < l.size(); i++) { - if (l.get(i).rulePrio() > p) { - return l.insert(i, e); - } - } - return l.append(e); - } - }; + private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); + + private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { + if (l == null) { + return List.of(e); + } else { + int p = e.rulePrio(); + for (int i = 0; i < l.size(); i++) { + if (l.get(i).rulePrio() > p) { + return l.insert(i, e); + } + } + return l.append(e); + } + }; @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); + private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant, List> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); + private static final Constant, List> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; @@ -228,22 +230,24 @@ public String toString() { @SuppressWarnings("rawtypes") protected final void makeFact() { FACTS.force(this, ADD_FACT, this); - patterns(1, toArray()); + patterns(1, toArray(), 2); } - private void patterns(int i, Object[] array) { + private void patterns(int i, Object[] array, int nrOfNulls) { if (i < length()) { array = array.clone(); if (array[i] == null) { array[i] = get(i); FACTS.force(term(array), ADD_FACT, this); } - patterns(i + 1, array); + patterns(i + 1, array, nrOfNulls); if (array[i] != null) { array[i] = null; - FACTS.force(term(array), ADD_FACT, this); + if (USE_EXTEND || nrOfNulls < array.length) { + FACTS.force(term(array), ADD_FACT, this); + } } - patterns(i + 1, array); + patterns(i + 1, array, nrOfNulls + 1); } } @@ -262,8 +266,8 @@ protected Map variables() { @SuppressWarnings("rawtypes") protected Map getBinding(TermImpl term) { - if (term.equals(INCOMPLETE)) { - return INCOMPLETE_MAP; + if (term.functor() == Incomplete.class) { + return Map.of(Entry.of(INCOMPLETE_VAR, term)); } else { Map vars = Map.of(); for (int i = 1; i < length(); i++) { @@ -277,8 +281,9 @@ protected Map getBinding(TermImpl term) { @SuppressWarnings("rawtypes") protected TermImpl setBinding(Map vars) { - if (vars.containsKey(INCOMPLETE_VAR)) { - return INCOMPLETE; + TermImpl inc = (TermImpl) vars.get(INCOMPLETE_VAR); + if (inc != null) { + return inc; } else { Object[] array = toArray(); for (int i = 1; i < length(); i++) { @@ -292,59 +297,67 @@ protected TermImpl setBinding(Map vars) { @SuppressWarnings({"rawtypes", "unchecked"}) protected Collection match(List der) { - Set facts = FACTS.get(this); - if (facts == null) { - List rules = RULES.get(Pair.of(functor(), length() - 1)); - if (rules != null) { - if (der.contains(this)) { - return INCOMPLETE_SET; - } else { - int non = nrOfNulls(); - der = der.prepend(this); - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this, der); - if (non == 0) { - Set set = eval.asSet(); - if (!set.isEmpty()) { - return set; + int non = nrOfNulls(); + if (!USE_EXTEND && non == length() - 1) { + return Set.of(incompl(der.append(this))); + } else { + Set facts = FACTS.get(this); + if (facts == null) { + List rules = RULES.get(Pair.of(functor(), length() - 1)); + if (rules != null) { + int i = der.lastIndexOf(this); + if (i >= 0) { + return Set.of(incompl(der.sublist(i, der.size()).append(this))); + } else { + Collection r = Set.of(); + for (RuleImpl rule : rules) { + Collection eval = rule.eval(this, der.append(this)); + if (non == 0) { + eval = eval.asSet(); + if (eval.equals(Set.of(this))) { + return eval; + } } - } else { r = Collection.concat(r, eval); } + if (non < 2 && non < length() - 1) { + Set set = r.asSet(); + FACTS.force(this, set); + return set; + } else { + return r; + } } - if (non < 2 && non < length() - 1) { - Set set = r.asSet(); - FACTS.force(this, set); - return set; - } else { - return r; - } + } else { + return Set.of(); } } else { - return Set.of(); + return facts; } - } else { - return facts; } } @SuppressWarnings("rawtypes") protected int termPrio(List der) { - Set facts = FACTS.get(this); - if (facts != null) { - return Integer.MIN_VALUE + facts.size(); + int non = nrOfNulls(); + if (!USE_EXTEND && non == length() - 1) { + return Integer.MAX_VALUE; } else { - List rules = RULES.get(Pair.of(functor(), length() - 1)); - if (rules != null) { - if (der.contains(this)) { - return Integer.MAX_VALUE; - } else { - return nrOfNulls(); + Set facts = FACTS.get(this); + if (facts != null) { + return Integer.MIN_VALUE + facts.size(); + } else { + List rules = RULES.get(Pair.of(functor(), length() - 1)); + if (rules != null) { + if (der.lastIndexOf(this) >= 0) { + return Integer.MAX_VALUE; + } else { + return non; + } } } + return Integer.MIN_VALUE; } - return Integer.MIN_VALUE; } @SuppressWarnings("rawtypes") @@ -487,11 +500,12 @@ protected List goals() { @SuppressWarnings({"rawtypes", "unchecked"}) private Collection> eval(List goals, Collection> vars, List der) { if (goals.isEmpty()) { + vars = vars.asSet(); return vars; } else { return vars.> flatMap(v -> { if (v.containsKey(INCOMPLETE_VAR)) { - return INCOMPLETE_MAP_SET; + return Set.of(v); } else { List actual = List.of(); for (TermImpl g : goals) { @@ -503,7 +517,7 @@ private Collection> eval(List goals, Collection m = f.match(der); return eval(goals.removeIndex(i), m.map(t -> { Map b = g.getBinding(t); - return b == INCOMPLETE_MAP ? b : v.putAll(b); + return b.containsKey(INCOMPLETE_VAR) ? b : v.putAll(b); }), der); } }); @@ -527,31 +541,33 @@ private static int first(List list, List der) { // Incomplete - public interface Incomplete { + public interface Incomplete extends Term { } - private static final TermImpl INCOMPLETE = new TermImpl(Incomplete.class); - @SuppressWarnings("rawtypes") - private static final Set INCOMPLETE_SET = Set.of(INCOMPLETE); - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); - @SuppressWarnings("rawtypes") - private static final Map INCOMPLETE_MAP = Map.of(Entry.of(INCOMPLETE_VAR, INCOMPLETE)); - @SuppressWarnings("rawtypes") - private static final Set> INCOMPLETE_MAP_SET = Set.of(INCOMPLETE_MAP); - - @SuppressWarnings("unchecked") - public static Incomplete incomplete() { - return INCOMPLETE.proxy(); - } + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); @SuppressWarnings("unchecked") public static Incomplete incompleteVar() { return INCOMPLETE_VAR.proxy(); } + public static Map incomplete(Term... der) { + return Map.of(Entry.of((Variable) incompleteVar(), incompl(list(der)).proxy())); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static TermImpl incompl(List der) { + return incompl(list(der)); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static TermImpl incompl(TermImpl der) { + return new TermImpl(Incomplete.class, der); + } + // Lists - public interface L { + public interface L extends Term { } @SuppressWarnings("unchecked") @@ -576,6 +592,15 @@ private static TermImpl list(E... es) { return l; } + @SuppressWarnings("rawtypes") + private static TermImpl list(List es) { + TermImpl l = EMPTY_LIST; + for (int i = es.size() - 1; i >= 0; i--) { + l = new TermImpl(L.class, unproxy(es.get(i)), l); + } + return l; + } + // Facts, Is public static void fact(Term term) { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 7728dd09..e7c78ae6 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -159,10 +159,12 @@ public void test2() { run(() -> { Person A = var("A"); // Ancestor Person D = var("D"); // Descendent - Person R = var("R"); // Relative + Person B = var("B"); // Relative1 + Person C = var("C"); // Relative2 rule(ancestorDescendent(A, D), parentChild(A, D)); - rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); + rule(ancestorDescendent(A, D), parentChild(A, B), parentChild(B, D)); + rule(ancestorDescendent(A, D), parentChild(A, B), ancestorDescendent(B, C), parentChild(C, D)); Person Carel = person("Carel"); Person Jan = person("Jan"); @@ -176,4 +178,19 @@ public void test2() { }); } + @RepeatedTest(100) + public void test3() { + run(() -> { + Person P = var("P"); + Person C = var("C"); + + rule(parentChild(P, C), parentChild(P, C)); + + Person Jan = person("Jan"); + Person Wim = person("Wim"); + + hasResult(Set.of(incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))), parentChild(Wim, Jan)); + }); + } + } From d5829c61959dd1a45031f263fadf1cb5d7bbdd9f Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Nov 2024 13:58:10 +0100 Subject: [PATCH 098/179] functors --- .../java/org/modelingvalue/dclare/Logic.java | 166 +++++++++++++----- .../modelingvalue/dclare/test/LogicTest.java | 13 +- 2 files changed, 136 insertions(+), 43 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 2656f062..d1c08652 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -32,7 +32,6 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; -import org.modelingvalue.collections.util.Pair; public final class Logic { private Logic() { @@ -61,7 +60,7 @@ private Logic() { private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant, List> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); + private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; @@ -101,14 +100,22 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } } - protected ClauseImpl(Class functor, Object... args) { + protected ClauseImpl(Functor functor, Object... args) { super(unproxy(functor, args)); } + protected ClauseImpl(FunctImpl functor, Object... args) { + super(unproxy(functor, args)); + } + + protected ClauseImpl(Class type, Object... args) { + super(unproxy(type, args)); + } + @SuppressWarnings("rawtypes") - private static final Object[] unproxy(Class functor, Object[] args) { + private static final Object[] unproxy(Object functor, Object[] args) { Object[] result = new Object[args.length + 1]; - result[0] = functor; + result[0] = Logic.unproxy(functor); for (int i = 0; i < args.length; i++) { result[i + 1] = Logic.unproxy(args[i]); } @@ -117,10 +124,7 @@ private static final Object[] unproxy(Class functor, Object[] args) { protected abstract F proxy(); - @SuppressWarnings("unchecked") - protected Class functor() { - return (Class) get(0); - } + protected abstract Class type(); protected abstract ClauseImpl term(Object[] array); } @@ -148,31 +152,77 @@ private static final Object proxy(Object object) { } } + // Functor + + public interface Functor extends Term { + } + + private static FunctImpl functImpl(Class type, String name, int arity) { + return new FunctImpl(type, name, arity); + } + + public static Functor functor(Class type, String name, int arity) { + return functImpl(type, name, arity).proxy(); + } + + private static final class FunctImpl extends ClauseImpl> { + private static final long serialVersionUID = 285147889847599160L; + + @SuppressWarnings({"unchecked", "rawtypes"}) + private FunctImpl(Class type, String name, int arity) { + super((Class) Functor.class, type, name, arity); + } + + @Override + @SuppressWarnings("unchecked") + protected final Functor proxy() { + return (Functor) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Functor.class}, this); + } + + @Override + public String toString() { + return ((String) get(2)); + } + + @Override + @SuppressWarnings("unchecked") + protected FunctImpl term(Object[] array) { + return new FunctImpl((Class) array[1], (String) array[2], (Integer) array[2]); + } + + @SuppressWarnings("unchecked") + @Override + protected Class> type() { + return (Class>) get(0); + } + + @SuppressWarnings("unchecked") + protected Class functType() { + return (Class) get(1); + } + } + // Variables public static interface Variable { } @SuppressWarnings("unchecked") - public static F var(Class functor, String id) { - return new VarImpl(functor, id).proxy(); + public static F var(Class type, String id) { + return new VarImpl(type, id).proxy(); } private static final class VarImpl extends ClauseImpl { private static final long serialVersionUID = -8998368070388908726L; - private VarImpl(Class functor, String name) { - super(functor, name); - } - - private VarImpl(Class functor, Object name) { - super(functor, name); + private VarImpl(Class type, String name) { + super(type, name); } @Override @SuppressWarnings("unchecked") protected final F proxy() { - return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Variable.class}, this); + return (F) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{type(), Variable.class}, this); } @Override @@ -183,7 +233,13 @@ public String toString() { @Override @SuppressWarnings("unchecked") protected VarImpl term(Object[] array) { - return new VarImpl(functor(), array[1]); + return new VarImpl(type(), (String) array[1]); + } + + @SuppressWarnings("unchecked") + @Override + protected Class type() { + return (Class) get(0); } } @@ -193,33 +249,41 @@ public static interface Term { } @SuppressWarnings("unchecked") - public static F term(Class functor, Object... args) { + public static F term(Functor functor, Object... args) { return new TermImpl(functor, args).proxy(); } + private static TermImpl termImpl(FunctImpl functor, Object... args) { + return new TermImpl(functor, args); + } + private static class TermImpl extends ClauseImpl { private static final long serialVersionUID = -1605559565948158856L; - private TermImpl(Class functor, Object... args) { + private TermImpl(Functor functor, Object... args) { + super(functor, args); + } + + private TermImpl(FunctImpl functor, Object... args) { super(functor, args); } @Override @SuppressWarnings("unchecked") protected F proxy() { - return (F) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{functor(), Term.class}, this); + return (F) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{type(), Term.class}, this); } @Override @SuppressWarnings("unchecked") protected TermImpl term(Object[] array) { - return new TermImpl((Class) array[0], Arrays.copyOfRange(array, 1, array.length)); + return new TermImpl((FunctImpl) array[0], Arrays.copyOfRange(array, 1, array.length)); } @SuppressWarnings({"unchecked", "rawtypes"}) @Override public String toString() { - if (functor() == L.class) { + if (type() == L.class) { return list().toString().substring(4); } else { String string = super.toString(); @@ -227,6 +291,17 @@ public String toString() { } } + @SuppressWarnings("unchecked") + @Override + protected Class type() { + return functor().functType(); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + protected FunctImpl functor() { + return (FunctImpl) get(0); + } + @SuppressWarnings("rawtypes") protected final void makeFact() { FACTS.force(this, ADD_FACT, this); @@ -266,7 +341,7 @@ protected Map variables() { @SuppressWarnings("rawtypes") protected Map getBinding(TermImpl term) { - if (term.functor() == Incomplete.class) { + if (term.type() == Incomplete.class) { return Map.of(Entry.of(INCOMPLETE_VAR, term)); } else { Map vars = Map.of(); @@ -303,7 +378,7 @@ protected Collection match(List der) { } else { Set facts = FACTS.get(this); if (facts == null) { - List rules = RULES.get(Pair.of(functor(), length() - 1)); + List rules = RULES.get(functor()); if (rules != null) { int i = der.lastIndexOf(this); if (i >= 0) { @@ -347,7 +422,7 @@ protected int termPrio(List der) { if (facts != null) { return Integer.MIN_VALUE + facts.size(); } else { - List rules = RULES.get(Pair.of(functor(), length() - 1)); + List rules = RULES.get(functor()); if (rules != null) { if (der.lastIndexOf(this) >= 0) { return Integer.MAX_VALUE; @@ -387,11 +462,13 @@ protected int nrOfNulls() { public static interface Rule extends Term { } + private static final FunctImpl RULE_FUNCTOR = functImpl(Rule.class, "rule", 2); + @SuppressWarnings({"unchecked", "rawtypes"}) public static Rule rule(Term term, Term... goals) { RuleImpl ruleImpl = new RuleImpl(term, goal(goals)); TermImpl termImpl = unproxy(term); - RULES.force(Pair.of(termImpl.functor(), termImpl.length() - 1), ADD_RULE, ruleImpl); + RULES.force(termImpl.functor(), ADD_RULE, ruleImpl); return ruleImpl.proxy(); } @@ -399,17 +476,17 @@ private static final class RuleImpl extends TermImpl { private static final long serialVersionUID = -4602043866952049391L; private RuleImpl(Term term, Goal goal) { - super(Rule.class, term, goal); + super(RULE_FUNCTOR, term, goal); } private RuleImpl(Object term, Object goal) { - super(Rule.class, term, goal); + super(RULE_FUNCTOR, term, goal); } @Override @SuppressWarnings("unchecked") protected final Rule proxy() { - return (Rule) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{Rule.class}, this); + return (Rule) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Rule.class}, this); } @SuppressWarnings("rawtypes") @@ -445,6 +522,8 @@ protected int rulePrio() { public static interface Goal extends Term { } + private static final FunctImpl GOAL_FUNCTOR = functImpl(Goal.class, "goal", 1); + public static boolean is(Term... goals) { return new GoalImpl(list(goals)).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); } @@ -463,17 +542,17 @@ private static final class GoalImpl extends TermImpl { private static final long serialVersionUID = -4100263206389367132L; private GoalImpl(L goals) { - super(Goal.class, goals); + super(GOAL_FUNCTOR, goals); } private GoalImpl(Object goals) { - super(Goal.class, goals); + super(GOAL_FUNCTOR, goals); } @Override @SuppressWarnings("unchecked") protected final Goal proxy() { - return (Goal) Proxy.newProxyInstance(functor().getClassLoader(), new Class[]{Goal.class}, this); + return (Goal) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Goal.class}, this); } @Override @@ -544,7 +623,9 @@ private static int first(List list, List der) { public interface Incomplete extends Term { } - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); + private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl(Incomplete.class, "incomplete", 1); + + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); @SuppressWarnings("unchecked") public static Incomplete incompleteVar() { @@ -562,7 +643,7 @@ private static TermImpl incompl(List der) { @SuppressWarnings({"unchecked", "rawtypes"}) private static TermImpl incompl(TermImpl der) { - return new TermImpl(Incomplete.class, der); + return termImpl(INCOMPLETE_FUNCTOR, der); } // Lists @@ -570,13 +651,18 @@ private static TermImpl incompl(TermImpl der) { public interface L extends Term { } + @SuppressWarnings("rawtypes") + private static final FunctImpl LIST_FUNCTOR_0 = functImpl(L.class, "l", 0); + @SuppressWarnings("rawtypes") + private static final FunctImpl LIST_FUNCTOR_2 = functImpl(L.class, "l", 2); + @SuppressWarnings("unchecked") public static L l(E head, L tail) { - return term(L.class, head, tail); + return termImpl(LIST_FUNCTOR_2, head, tail).proxy(); } @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = new TermImpl(L.class); + private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); @SuppressWarnings({"unchecked", "rawtypes"}) public static L l(E... es) { @@ -587,7 +673,7 @@ public static L l(E... es) { private static TermImpl list(E... es) { TermImpl l = EMPTY_LIST; for (int i = es.length - 1; i >= 0; i--) { - l = new TermImpl(L.class, unproxy(es[i]), l); + l = termImpl(LIST_FUNCTOR_2, unproxy(es[i]), l); } return l; } @@ -596,7 +682,7 @@ private static TermImpl list(E... es) { private static TermImpl list(List es) { TermImpl l = EMPTY_LIST; for (int i = es.size() - 1; i >= 0; i--) { - l = new TermImpl(L.class, unproxy(es.get(i)), l); + l = termImpl(LIST_FUNCTOR_2, unproxy(es.get(i)), l); } return l; } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index e7c78ae6..81a75284 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -31,6 +31,7 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.dclare.Logic; +import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; @@ -61,8 +62,10 @@ static void hasResult(Set> bindings, Term... goals) { interface Person extends Term { } + static Functor person = functor(Person.class, "person", 1); + Person person(String name) { - return term(Person.class, name); + return term(person, name); } Person var(String name) { @@ -72,15 +75,19 @@ Person var(String name) { interface ParentChild extends Term { } + static Functor parentChild = functor(ParentChild.class, "parentChild", 2); + ParentChild parentChild(Person parent, Person child) { - return term(ParentChild.class, parent, child); + return term(parentChild, parent, child); } interface AncestorDescendent extends Term { } + static Functor ancestorDescendent = functor(AncestorDescendent.class, "ancestorDescendent", 2); + AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { - return term(AncestorDescendent.class, ancestor, descendent); + return term(ancestorDescendent, ancestor, descendent); } @RepeatedTest(100) From 56570e06472be20495a0bcc8ee7976d487a721bf Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Nov 2024 15:13:56 +0100 Subject: [PATCH 099/179] functors with arguments --- .../java/org/modelingvalue/dclare/Logic.java | 113 ++++++++++++++---- .../modelingvalue/dclare/test/LogicTest.java | 6 +- 2 files changed, 94 insertions(+), 25 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index d1c08652..bf38ad50 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -32,6 +32,16 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; +import org.modelingvalue.collections.util.SerializableBiFunction; +import org.modelingvalue.collections.util.SerializableBiFunction.SerializableBiFunctionImpl; +import org.modelingvalue.collections.util.SerializableFunction; +import org.modelingvalue.collections.util.SerializableFunction.SerializableFunctionImpl; +import org.modelingvalue.collections.util.SerializableQuadFunction; +import org.modelingvalue.collections.util.SerializableQuadFunction.SerializableQuadFunctionImpl; +import org.modelingvalue.collections.util.SerializableSupplier; +import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; +import org.modelingvalue.collections.util.SerializableTriFunction; +import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; public final class Logic { private Logic() { @@ -157,20 +167,62 @@ private static final Object proxy(Object object) { public interface Functor extends Term { } - private static FunctImpl functImpl(Class type, String name, int arity) { - return new FunctImpl(type, name, arity); + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableSupplier method) { + SerializableSupplierImpl l = method.of(); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + } + + public static Functor functor(SerializableSupplier method) { + return functImpl(method).proxy(); + } + + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableFunction method) { + SerializableFunctionImpl l = method.of(); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + } + + public static Functor functor(SerializableFunction method) { + return functImpl(method).proxy(); + } + + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableBiFunction method) { + SerializableBiFunctionImpl l = method.of(); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + } + + public static Functor functor(SerializableBiFunction method) { + return functImpl(method).proxy(); + } + + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableTriFunction method) { + SerializableTriFunctionImpl l = method.of(); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + } + + public static Functor functor(SerializableTriFunction method) { + return functImpl(method).proxy(); } - public static Functor functor(Class type, String name, int arity) { - return functImpl(type, name, arity).proxy(); + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableQuadFunction method) { + SerializableQuadFunctionImpl l = method.of(); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + } + + public static Functor functor(SerializableQuadFunction method) { + return functImpl(method).proxy(); } private static final class FunctImpl extends ClauseImpl> { private static final long serialVersionUID = 285147889847599160L; @SuppressWarnings({"unchecked", "rawtypes"}) - private FunctImpl(Class type, String name, int arity) { - super((Class) Functor.class, type, name, arity); + private FunctImpl(Class type, String name, TermImpl args) { + super((Class) Functor.class, type, name, args); } @Override @@ -185,9 +237,9 @@ public String toString() { } @Override - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "rawtypes"}) protected FunctImpl term(Object[] array) { - return new FunctImpl((Class) array[1], (String) array[2], (Integer) array[2]); + return new FunctImpl((Class) array[1], (String) array[2], (TermImpl) array[3]); } @SuppressWarnings("unchecked") @@ -374,7 +426,7 @@ protected TermImpl setBinding(Map vars) { protected Collection match(List der) { int non = nrOfNulls(); if (!USE_EXTEND && non == length() - 1) { - return Set.of(incompl(der.append(this))); + return Set.of(incomplete(der.append(this))); } else { Set facts = FACTS.get(this); if (facts == null) { @@ -382,7 +434,7 @@ protected Collection match(List der) { if (rules != null) { int i = der.lastIndexOf(this); if (i >= 0) { - return Set.of(incompl(der.sublist(i, der.size()).append(this))); + return Set.of(incomplete(der.sublist(i, der.size()).append(this))); } else { Collection r = Set.of(); for (RuleImpl rule : rules) { @@ -462,11 +514,16 @@ protected int nrOfNulls() { public static interface Rule extends Term { } - private static final FunctImpl RULE_FUNCTOR = functImpl(Rule.class, "rule", 2); + private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule); @SuppressWarnings({"unchecked", "rawtypes"}) public static Rule rule(Term term, Term... goals) { - RuleImpl ruleImpl = new RuleImpl(term, goal(goals)); + return rule(term, goal(goals)); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Rule rule(Term term, Goal goal) { + RuleImpl ruleImpl = new RuleImpl(term, goal); TermImpl termImpl = unproxy(term); RULES.force(termImpl.functor(), ADD_RULE, ruleImpl); return ruleImpl.proxy(); @@ -522,7 +579,8 @@ protected int rulePrio() { public static interface Goal extends Term { } - private static final FunctImpl GOAL_FUNCTOR = functImpl(Goal.class, "goal", 1); + @SuppressWarnings({"unchecked", "rawtypes"}) + private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal); public static boolean is(Term... goals) { return new GoalImpl(list(goals)).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); @@ -535,7 +593,12 @@ public static Set> eval(Term... goals) { @SuppressWarnings({"unchecked", "rawtypes"}) public static Goal goal(Term... goals) { - return new GoalImpl(list(goals)).proxy(); + return goal(list(goals).proxy()); + } + + @SuppressWarnings("unchecked") + public static Goal goal(L goals) { + return new GoalImpl(goals).proxy(); } private static final class GoalImpl extends TermImpl { @@ -623,9 +686,10 @@ private static int first(List list, List der) { public interface Incomplete extends Term { } - private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl(Incomplete.class, "incomplete", 1); + @SuppressWarnings("rawtypes") + private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete); - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "Incomplete"); + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); @SuppressWarnings("unchecked") public static Incomplete incompleteVar() { @@ -633,28 +697,33 @@ public static Incomplete incompleteVar() { } public static Map incomplete(Term... der) { - return Map.of(Entry.of((Variable) incompleteVar(), incompl(list(der)).proxy())); + return Map.of(Entry.of((Variable) incompleteVar(), incomplete(list(der)).proxy())); } @SuppressWarnings({"unchecked", "rawtypes"}) - private static TermImpl incompl(List der) { - return incompl(list(der)); + private static TermImpl incomplete(List der) { + return incomplete(list(der)); } @SuppressWarnings({"unchecked", "rawtypes"}) - private static TermImpl incompl(TermImpl der) { + private static TermImpl incomplete(TermImpl der) { return termImpl(INCOMPLETE_FUNCTOR, der); } + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Incomplete incomplete(L der) { + return termImpl(INCOMPLETE_FUNCTOR, der).proxy(); + } + // Lists public interface L extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl(L.class, "l", 0); + private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l); @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl(L.class, "l", 2); + private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l); @SuppressWarnings("unchecked") public static L l(E head, L tail) { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 81a75284..b8267381 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -62,7 +62,7 @@ static void hasResult(Set> bindings, Term... goals) { interface Person extends Term { } - static Functor person = functor(Person.class, "person", 1); + static Functor person = functor(LogicTest::person); Person person(String name) { return term(person, name); @@ -75,7 +75,7 @@ Person var(String name) { interface ParentChild extends Term { } - static Functor parentChild = functor(ParentChild.class, "parentChild", 2); + static Functor parentChild = functor(LogicTest::parentChild); ParentChild parentChild(Person parent, Person child) { return term(parentChild, parent, child); @@ -84,7 +84,7 @@ ParentChild parentChild(Person parent, Person child) { interface AncestorDescendent extends Term { } - static Functor ancestorDescendent = functor(AncestorDescendent.class, "ancestorDescendent", 2); + static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { return term(ancestorDescendent, ancestor, descendent); From 2b7e1054fbbc16c882738abae712d52e57f10cd4 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Nov 2024 16:28:28 +0100 Subject: [PATCH 100/179] empty L functor fix --- src/main/java/org/modelingvalue/dclare/Logic.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index bf38ad50..13ec51b1 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -252,6 +252,11 @@ protected Class> type() { protected Class functType() { return (Class) get(1); } + + @Override + public int hashCode() { + return super.hashCode(); + } } // Variables @@ -731,7 +736,15 @@ public static L l(E head, L tail) { } @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); + private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); + + @SuppressWarnings("rawtypes") + private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); + + @SuppressWarnings({"unchecked", "rawtypes"}) + public static L l() { + return EMPTY_LIST_PROXY; + } @SuppressWarnings({"unchecked", "rawtypes"}) public static L l(E... es) { From 2edaf9e90bf6c7fee7d9fbcb8341d33d7fef48e2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Nov 2024 16:29:08 +0100 Subject: [PATCH 101/179] remove hashcode --- src/main/java/org/modelingvalue/dclare/Logic.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 13ec51b1..13c5a657 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -252,11 +252,6 @@ protected Class> type() { protected Class functType() { return (Class) get(1); } - - @Override - public int hashCode() { - return super.hashCode(); - } } // Variables From a3d303b59b4c9f282180ce4d5da01e56c3174d30 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 26 Nov 2024 19:04:23 +0100 Subject: [PATCH 102/179] functor uses List iso L --- .../java/org/modelingvalue/dclare/Logic.java | 110 +++++++++++------- 1 file changed, 67 insertions(+), 43 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 13c5a657..0785df1e 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -24,6 +24,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Arrays; +import java.util.Objects; import java.util.function.BiFunction; import org.modelingvalue.collections.Collection; @@ -115,15 +116,24 @@ protected ClauseImpl(Functor functor, Object... args) { } protected ClauseImpl(FunctImpl functor, Object... args) { - super(unproxy(functor, args)); + super(array(functor, args)); } protected ClauseImpl(Class type, Object... args) { - super(unproxy(type, args)); + super(array(type, args)); + } + + private static final Object[] array(Object functor, Object[] args) { + Object[] result = new Object[args.length + 1]; + result[0] = noProxy(functor); + for (int i = 0; i < args.length; i++) { + result[i + 1] = noProxy(args[i]); + } + return result; } @SuppressWarnings("rawtypes") - private static final Object[] unproxy(Object functor, Object[] args) { + private static final Object[] unproxy(Functor functor, Object[] args) { Object[] result = new Object[args.length + 1]; result[0] = Logic.unproxy(functor); for (int i = 0; i < args.length; i++) { @@ -139,18 +149,27 @@ private static final Object[] unproxy(Object functor, Object[] args) { protected abstract ClauseImpl term(Object[] array); } + private static final Object noProxy(Object object) { + if (object instanceof Term) { + throw new IllegalArgumentException(); + } else { + return object; + } + } + @SuppressWarnings("rawtypes") private static final Object unproxy(Object object) { if (object instanceof Term) { return Proxy.getInvocationHandler(object); } else { + Objects.requireNonNull(object); return object; } } @SuppressWarnings("unchecked") - private static final TermImpl unproxy(T object) { - return (TermImpl) Proxy.getInvocationHandler(object); + private static final ClauseImpl unproxy(T object) { + return (ClauseImpl) Proxy.getInvocationHandler(object); } @SuppressWarnings("rawtypes") @@ -170,7 +189,7 @@ public interface Functor extends Term { @SuppressWarnings("unchecked") private static FunctImpl functImpl(SerializableSupplier method) { SerializableSupplierImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); } public static Functor functor(SerializableSupplier method) { @@ -180,7 +199,7 @@ public static Functor functor(SerializableSupplier method) { @SuppressWarnings("unchecked") private static FunctImpl functImpl(SerializableFunction method) { SerializableFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); } public static Functor functor(SerializableFunction method) { @@ -190,7 +209,7 @@ public static Functor functor(SerializableFunction method) { @SuppressWarnings("unchecked") private static FunctImpl functImpl(SerializableBiFunction method) { SerializableBiFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); } public static Functor functor(SerializableBiFunction method) { @@ -200,7 +219,7 @@ public static Functor functor(SerializableBiFunction metho @SuppressWarnings("unchecked") private static FunctImpl functImpl(SerializableTriFunction method) { SerializableTriFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); } public static Functor functor(SerializableTriFunction method) { @@ -210,7 +229,7 @@ public static Functor functor(SerializableTriFunction FunctImpl functImpl(SerializableQuadFunction method) { SerializableQuadFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), list(l.in())); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); } public static Functor functor(SerializableQuadFunction method) { @@ -221,7 +240,7 @@ private static final class FunctImpl extends ClauseImpl> { private static final long serialVersionUID = 285147889847599160L; @SuppressWarnings({"unchecked", "rawtypes"}) - private FunctImpl(Class type, String name, TermImpl args) { + private FunctImpl(Class type, String name, List> args) { super((Class) Functor.class, type, name, args); } @@ -239,7 +258,7 @@ public String toString() { @Override @SuppressWarnings({"unchecked", "rawtypes"}) protected FunctImpl term(Object[] array) { - return new FunctImpl((Class) array[1], (String) array[2], (TermImpl) array[3]); + return new FunctImpl((Class) array[1], (String) array[2], (List>) array[3]); } @SuppressWarnings("unchecked") @@ -256,7 +275,7 @@ protected Class functType() { // Variables - public static interface Variable { + public static interface Variable extends Term { } @SuppressWarnings("unchecked") @@ -301,15 +320,15 @@ public static interface Term { } @SuppressWarnings("unchecked") - public static F term(Functor functor, Object... args) { + public static F term(Functor functor, Object... args) { return new TermImpl(functor, args).proxy(); } - private static TermImpl termImpl(FunctImpl functor, Object... args) { + private static TermImpl termImpl(FunctImpl functor, Object... args) { return new TermImpl(functor, args); } - private static class TermImpl extends ClauseImpl { + private static class TermImpl extends ClauseImpl { private static final long serialVersionUID = -1605559565948158856L; private TermImpl(Functor functor, Object... args) { @@ -514,7 +533,8 @@ protected int nrOfNulls() { public static interface Rule extends Term { } - private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule); + private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule); + private static final Functor RULE_FUNCTOR_PROXY = RULE_FUNCTOR.proxy(); @SuppressWarnings({"unchecked", "rawtypes"}) public static Rule rule(Term term, Term... goals) { @@ -524,7 +544,7 @@ public static Rule rule(Term term, Term... goals) { @SuppressWarnings({"unchecked", "rawtypes"}) public static Rule rule(Term term, Goal goal) { RuleImpl ruleImpl = new RuleImpl(term, goal); - TermImpl termImpl = unproxy(term); + TermImpl termImpl = (TermImpl) unproxy(term); RULES.force(termImpl.functor(), ADD_RULE, ruleImpl); return ruleImpl.proxy(); } @@ -533,10 +553,11 @@ private static final class RuleImpl extends TermImpl { private static final long serialVersionUID = -4602043866952049391L; private RuleImpl(Term term, Goal goal) { - super(RULE_FUNCTOR, term, goal); + super(RULE_FUNCTOR_PROXY, term, goal); } - private RuleImpl(Object term, Object goal) { + @SuppressWarnings("rawtypes") + private RuleImpl(TermImpl term, GoalImpl goal) { super(RULE_FUNCTOR, term, goal); } @@ -564,9 +585,9 @@ protected Collection eval(TermImpl ptrn, List der) { } @Override - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "rawtypes"}) protected RuleImpl term(Object[] array) { - return new RuleImpl(array[1], array[2]); + return new RuleImpl((TermImpl) array[1], (GoalImpl) array[2]); } protected int rulePrio() { @@ -580,7 +601,8 @@ public static interface Goal extends Term { } @SuppressWarnings({"unchecked", "rawtypes"}) - private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal); + private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal); + private static final Functor GOAL_FUNCTOR_PROXY = GOAL_FUNCTOR.proxy(); public static boolean is(Term... goals) { return new GoalImpl(list(goals)).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); @@ -593,7 +615,7 @@ public static Set> eval(Term... goals) { @SuppressWarnings({"unchecked", "rawtypes"}) public static Goal goal(Term... goals) { - return goal(list(goals).proxy()); + return new GoalImpl(list(goals)).proxy(); } @SuppressWarnings("unchecked") @@ -605,10 +627,11 @@ private static final class GoalImpl extends TermImpl { private static final long serialVersionUID = -4100263206389367132L; private GoalImpl(L goals) { - super(GOAL_FUNCTOR, goals); + super(GOAL_FUNCTOR_PROXY, goals); } - private GoalImpl(Object goals) { + @SuppressWarnings("rawtypes") + private GoalImpl(TermImpl goals) { super(GOAL_FUNCTOR, goals); } @@ -619,9 +642,9 @@ protected final Goal proxy() { } @Override - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "rawtypes"}) protected GoalImpl term(Object[] array) { - return new GoalImpl(array[1]); + return new GoalImpl((TermImpl) array[1]); } @SuppressWarnings("rawtypes") @@ -687,13 +710,14 @@ public interface Incomplete extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete); - - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); + private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete); + private static final Functor INCOMPLETE_FUNCTOR_PROXY = INCOMPLETE_FUNCTOR.proxy(); + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); + private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); @SuppressWarnings("unchecked") public static Incomplete incompleteVar() { - return INCOMPLETE_VAR.proxy(); + return INCOMPLETE_VAR_PROXY; } public static Map incomplete(Term... der) { @@ -712,7 +736,7 @@ private static TermImpl incomplete(TermImpl der) { @SuppressWarnings({"unchecked", "rawtypes"}) private static Incomplete incomplete(L der) { - return termImpl(INCOMPLETE_FUNCTOR, der).proxy(); + return term(INCOMPLETE_FUNCTOR_PROXY, der); } // Lists @@ -721,21 +745,21 @@ public interface L extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l); + private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l); @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l); + private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l); + @SuppressWarnings("rawtypes") + private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); + @SuppressWarnings("rawtypes") + private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); + @SuppressWarnings("rawtypes") + private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); @SuppressWarnings("unchecked") public static L l(E head, L tail) { - return termImpl(LIST_FUNCTOR_2, head, tail).proxy(); + return term(LIST_FUNCTOR_2_PROXY, head, tail); } - @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); - - @SuppressWarnings("rawtypes") - private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); - @SuppressWarnings({"unchecked", "rawtypes"}) public static L l() { return EMPTY_LIST_PROXY; @@ -767,7 +791,7 @@ private static TermImpl list(List es) { // Facts, Is public static void fact(Term term) { - unproxy(term).makeFact(); + ((TermImpl) unproxy(term)).makeFact(); } // Variable bindings From 27021a68f885293d05d92921f44f92486e57a1a4 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 27 Nov 2024 08:41:52 +0100 Subject: [PATCH 103/179] also cash direct matches --- src/main/java/org/modelingvalue/dclare/Logic.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 0785df1e..5518a964 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -461,7 +461,8 @@ protected Collection match(List der) { if (non == 0) { eval = eval.asSet(); if (eval.equals(Set.of(this))) { - return eval; + r = eval; + break; } } r = Collection.concat(r, eval); From 5cccc54697336055611368a9fa4a89cd865fcab0 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 27 Nov 2024 08:51:41 +0100 Subject: [PATCH 104/179] reuse array --- .../java/org/modelingvalue/dclare/Logic.java | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 5518a964..eb11461e 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -123,6 +123,10 @@ protected ClauseImpl(Class type, Object... args) { super(array(type, args)); } + protected ClauseImpl(Object[] args) { + super(args); + } + private static final Object[] array(Object functor, Object[] args) { Object[] result = new Object[args.length + 1]; result[0] = noProxy(functor); @@ -244,6 +248,11 @@ private FunctImpl(Class type, String name, List> args) { super((Class) Functor.class, type, name, args); } + @SuppressWarnings({"unchecked", "rawtypes"}) + private FunctImpl(Object[] args) { + super(args); + } + @Override @SuppressWarnings("unchecked") protected final Functor proxy() { @@ -258,7 +267,7 @@ public String toString() { @Override @SuppressWarnings({"unchecked", "rawtypes"}) protected FunctImpl term(Object[] array) { - return new FunctImpl((Class) array[1], (String) array[2], (List>) array[3]); + return new FunctImpl(array); } @SuppressWarnings("unchecked") @@ -290,6 +299,10 @@ private VarImpl(Class type, String name) { super(type, name); } + private VarImpl(Object[] args) { + super(args); + } + @Override @SuppressWarnings("unchecked") protected final F proxy() { @@ -304,7 +317,7 @@ public String toString() { @Override @SuppressWarnings("unchecked") protected VarImpl term(Object[] array) { - return new VarImpl(type(), (String) array[1]); + return new VarImpl(array); } @SuppressWarnings("unchecked") @@ -339,6 +352,10 @@ private TermImpl(FunctImpl functor, Object... args) { super(functor, args); } + private TermImpl(Object[] args) { + super(args); + } + @Override @SuppressWarnings("unchecked") protected F proxy() { @@ -562,6 +579,10 @@ private RuleImpl(TermImpl term, GoalImpl goal) { super(RULE_FUNCTOR, term, goal); } + private RuleImpl(Object[] args) { + super(args); + } + @Override @SuppressWarnings("unchecked") protected final Rule proxy() { @@ -588,7 +609,7 @@ protected Collection eval(TermImpl ptrn, List der) { @Override @SuppressWarnings({"unchecked", "rawtypes"}) protected RuleImpl term(Object[] array) { - return new RuleImpl((TermImpl) array[1], (GoalImpl) array[2]); + return new RuleImpl(array); } protected int rulePrio() { @@ -636,6 +657,10 @@ private GoalImpl(TermImpl goals) { super(GOAL_FUNCTOR, goals); } + private GoalImpl(Object[] args) { + super(args); + } + @Override @SuppressWarnings("unchecked") protected final Goal proxy() { @@ -645,7 +670,7 @@ protected final Goal proxy() { @Override @SuppressWarnings({"unchecked", "rawtypes"}) protected GoalImpl term(Object[] array) { - return new GoalImpl((TermImpl) array[1]); + return new GoalImpl(array); } @SuppressWarnings("rawtypes") From 745c688d4ff47039363b00daeabba5bcfed5147f Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 27 Nov 2024 09:20:41 +0100 Subject: [PATCH 105/179] var --- .../java/org/modelingvalue/dclare/Logic.java | 3 +- .../modelingvalue/dclare/test/LogicTest.java | 29 ++++++++----------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index eb11461e..50f8a5e9 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -656,7 +656,8 @@ private GoalImpl(L goals) { private GoalImpl(TermImpl goals) { super(GOAL_FUNCTOR, goals); } - + + private GoalImpl(Object[] args) { super(args); } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index b8267381..9797c9a0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -30,7 +30,6 @@ import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; -import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; @@ -68,10 +67,6 @@ Person person(String name) { return term(person, name); } - Person var(String name) { - return Logic.var(Person.class, name); - } - interface ParentChild extends Term { } @@ -93,9 +88,9 @@ AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { @RepeatedTest(100) public void test0() { run(() -> { - Person A = var("A"); // Ancestor - Person D = var("D"); // Descendent - Person R = var("R"); // Relative + Person A = var(Person.class, "A"); // Ancestor + Person D = var(Person.class, "D"); // Descendent + Person R = var(Person.class, "R"); // Relative rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); @@ -136,9 +131,9 @@ public void test0() { @RepeatedTest(100) public void test1() { run(() -> { - Person A = var("A"); // Ancestor - Person D = var("D"); // Descendent - Person R = var("R"); // Relative + Person A = var(Person.class, "A"); // Ancestor + Person D = var(Person.class, "D"); // Descendent + Person R = var(Person.class, "R"); // Relative rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); @@ -164,10 +159,10 @@ public void test1() { @RepeatedTest(100) public void test2() { run(() -> { - Person A = var("A"); // Ancestor - Person D = var("D"); // Descendent - Person B = var("B"); // Relative1 - Person C = var("C"); // Relative2 + Person A = var(Person.class, "A"); // Ancestor + Person D = var(Person.class, "D"); // Descendent + Person B = var(Person.class, "B"); // Relative1 + Person C = var(Person.class, "C"); // Relative2 rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), parentChild(A, B), parentChild(B, D)); @@ -188,8 +183,8 @@ public void test2() { @RepeatedTest(100) public void test3() { run(() -> { - Person P = var("P"); - Person C = var("C"); + Person P = var(Person.class, "P"); + Person C = var(Person.class, "C"); rule(parentChild(P, C), parentChild(P, C)); From 11bc302707a67ea0d81a6469eb28b225ce34d642 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 27 Nov 2024 11:02:25 +0100 Subject: [PATCH 106/179] var method --- .../modelingvalue/dclare/test/LogicTest.java | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 9797c9a0..1fa80af0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -38,6 +38,8 @@ public class LogicTest { + // Utilities + void run(Runnable test) { UniverseTransaction universeTransaction = new UniverseTransaction(Universe.of(), THE_POOL); boolean seq = ThreadLocalRandom.current().nextBoolean(); @@ -58,21 +60,27 @@ static void hasResult(Set> bindings, Term... goals) { assertEquals(bindings, eval(goals)); } + // Example + interface Person extends Term { } static Functor person = functor(LogicTest::person); - Person person(String name) { + static Person person(String name) { return term(person, name); } + static Person personVar(String name) { + return var(Person.class, name); + } + interface ParentChild extends Term { } static Functor parentChild = functor(LogicTest::parentChild); - ParentChild parentChild(Person parent, Person child) { + static ParentChild parentChild(Person parent, Person child) { return term(parentChild, parent, child); } @@ -81,16 +89,16 @@ interface AncestorDescendent extends Term { static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); - AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { + static AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { return term(ancestorDescendent, ancestor, descendent); } @RepeatedTest(100) public void test0() { run(() -> { - Person A = var(Person.class, "A"); // Ancestor - Person D = var(Person.class, "D"); // Descendent - Person R = var(Person.class, "R"); // Relative + Person A = personVar("A"); // Ancestor + Person D = personVar("D"); // Descendent + Person R = personVar("R"); // Relative rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); @@ -131,9 +139,9 @@ public void test0() { @RepeatedTest(100) public void test1() { run(() -> { - Person A = var(Person.class, "A"); // Ancestor - Person D = var(Person.class, "D"); // Descendent - Person R = var(Person.class, "R"); // Relative + Person A = personVar("A"); // Ancestor + Person D = personVar("D"); // Descendent + Person R = personVar("R"); // Relative rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); @@ -159,10 +167,10 @@ public void test1() { @RepeatedTest(100) public void test2() { run(() -> { - Person A = var(Person.class, "A"); // Ancestor - Person D = var(Person.class, "D"); // Descendent - Person B = var(Person.class, "B"); // Relative1 - Person C = var(Person.class, "C"); // Relative2 + Person A = personVar("A"); // Ancestor + Person D = personVar("D"); // Descendent + Person B = personVar("B"); // Relative1 + Person C = personVar("C"); // Relative2 rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), parentChild(A, B), parentChild(B, D)); @@ -183,8 +191,8 @@ public void test2() { @RepeatedTest(100) public void test3() { run(() -> { - Person P = var(Person.class, "P"); - Person C = var(Person.class, "C"); + Person P = personVar("P"); + Person C = personVar("C"); rule(parentChild(P, C), parentChild(P, C)); From 63821cc5ecd7dd736ca1a1c57938665edbd3f1a5 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 27 Nov 2024 12:48:19 +0100 Subject: [PATCH 107/179] separate var methods --- .../java/org/modelingvalue/dclare/test/LogicTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 1fa80af0..efc10c35 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -84,6 +84,10 @@ static ParentChild parentChild(Person parent, Person child) { return term(parentChild, parent, child); } + static ParentChild parentChildVar(String name) { + return var(ParentChild.class, name); + } + interface AncestorDescendent extends Term { } @@ -93,6 +97,10 @@ static AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) return term(ancestorDescendent, ancestor, descendent); } + static AncestorDescendent ancestorDescendentVar(String name) { + return var(AncestorDescendent.class, name); + } + @RepeatedTest(100) public void test0() { run(() -> { From ceac9c7c5eb520467e848826de72a1917bfb69da Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 28 Nov 2024 09:12:12 +0100 Subject: [PATCH 108/179] Logic with function implementations part 1 --- .../java/org/modelingvalue/dclare/Logic.java | 111 +++++++++++++----- .../modelingvalue/dclare/test/LogicTest.java | 104 ++++++++++------ 2 files changed, 152 insertions(+), 63 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 50f8a5e9..946d7255 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -33,6 +33,7 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; +import org.modelingvalue.collections.util.LambdaReflection; import org.modelingvalue.collections.util.SerializableBiFunction; import org.modelingvalue.collections.util.SerializableBiFunction.SerializableBiFunctionImpl; import org.modelingvalue.collections.util.SerializableFunction; @@ -190,61 +191,110 @@ private static final Object proxy(Object object) { public interface Functor extends Term { } + public interface Functor0 extends Functor { + } + @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableSupplier method) { + private static FunctImpl functImpl(SerializableSupplier method, SerializableSupplier> impl) { SerializableSupplierImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - public static Functor functor(SerializableSupplier method) { - return functImpl(method).proxy(); + @SuppressWarnings("unchecked") + public static Functor0 functor(SerializableSupplier method, SerializableSupplier> impl) { + return (Functor0) functImpl(method, impl).proxy(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableFunction method) { + public static Functor0 functor(SerializableSupplier method) { + return (Functor0) functImpl(method, null).proxy(); + } + + public interface Functor1 extends Functor0 { + A get1(); + } + + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableFunction method, SerializableFunction> impl) { SerializableFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - public static Functor functor(SerializableFunction method) { - return functImpl(method).proxy(); + @SuppressWarnings("unchecked") + public static Functor1 functor(SerializableFunction method, SerializableFunction> impl) { + return (Functor1) functImpl(method, impl).proxy(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableBiFunction method) { + public static Functor1 functor(SerializableFunction method) { + return (Functor1) functImpl(method, null).proxy(); + } + + public interface Functor2 extends Functor1 { + B get2(); + } + + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableBiFunction method, SerializableBiFunction> impl) { SerializableBiFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - public static Functor functor(SerializableBiFunction method) { - return functImpl(method).proxy(); + @SuppressWarnings("unchecked") + public static Functor2 functor(SerializableBiFunction method, SerializableBiFunction> impl) { + return (Functor2) functImpl(method, impl.of()).proxy(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableTriFunction method) { + public static Functor2 functor(SerializableBiFunction method) { + return (Functor2) functImpl(method, null).proxy(); + } + + public interface Functor3 extends Functor2 { + C get3(); + } + + @SuppressWarnings("unchecked") + private static FunctImpl functImpl(SerializableTriFunction method, SerializableTriFunction> impl) { SerializableTriFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); + } + + @SuppressWarnings("unchecked") + public static Functor3 functor(SerializableTriFunction method, SerializableTriFunction> impl) { + return (Functor3) functImpl(method, impl).proxy(); + } + + @SuppressWarnings("unchecked") + public static Functor3 functor(SerializableTriFunction method) { + return (Functor3) functImpl(method, null).proxy(); } - public static Functor functor(SerializableTriFunction method) { - return functImpl(method).proxy(); + public interface Functor4 extends Functor3 { + D get4(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableQuadFunction method) { + private static FunctImpl functImpl(SerializableQuadFunction method, SerializableQuadFunction> impl) { SerializableQuadFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in()); + return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); + } + + @SuppressWarnings("unchecked") + public static Functor4 functor(SerializableQuadFunction method, SerializableQuadFunction> impl) { + return (Functor4) functImpl(method, impl).proxy(); } - public static Functor functor(SerializableQuadFunction method) { - return functImpl(method).proxy(); + @SuppressWarnings("unchecked") + public static Functor4 functor(SerializableQuadFunction method) { + return (Functor4) functImpl(method, null).proxy(); } private static final class FunctImpl extends ClauseImpl> { private static final long serialVersionUID = 285147889847599160L; @SuppressWarnings({"unchecked", "rawtypes"}) - private FunctImpl(Class type, String name, List> args) { + private FunctImpl(Class type, String name, List> args, LambdaReflection l) { super((Class) Functor.class, type, name, args); } @@ -254,9 +304,11 @@ private FunctImpl(Object[] args) { } @Override - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "rawtypes"}) protected final Functor proxy() { - return (Functor) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Functor.class}, this); + int l = length() - 1; + Class f = l == 0 ? Functor0.class : l == 1 ? Functor1.class : l == 2 ? Functor2.class : l == 3 ? Functor3.class : Functor4.class; + return (Functor) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{f}, this); } @Override @@ -551,7 +603,7 @@ protected int nrOfNulls() { public static interface Rule extends Term { } - private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule); + private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule, null); private static final Functor RULE_FUNCTOR_PROXY = RULE_FUNCTOR.proxy(); @SuppressWarnings({"unchecked", "rawtypes"}) @@ -623,7 +675,7 @@ public static interface Goal extends Term { } @SuppressWarnings({"unchecked", "rawtypes"}) - private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal); + private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal, null); private static final Functor GOAL_FUNCTOR_PROXY = GOAL_FUNCTOR.proxy(); public static boolean is(Term... goals) { @@ -656,8 +708,7 @@ private GoalImpl(L goals) { private GoalImpl(TermImpl goals) { super(GOAL_FUNCTOR, goals); } - - + private GoalImpl(Object[] args) { super(args); } @@ -737,7 +788,7 @@ public interface Incomplete extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete); + private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete, null); private static final Functor INCOMPLETE_FUNCTOR_PROXY = INCOMPLETE_FUNCTOR.proxy(); private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); @@ -772,9 +823,9 @@ public interface L extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l); + private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l); + private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); @SuppressWarnings("rawtypes") private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); @SuppressWarnings("rawtypes") diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index efc10c35..9a1db842 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -60,7 +60,49 @@ static void hasResult(Set> bindings, Term... goals) { assertEquals(bindings, eval(goals)); } - // Example + @SuppressWarnings({"unchecked", "rawtypes"}) + static Set> set(Map... bindings) { + return Set.of(bindings); + } + + // Integer + + interface Int extends Term { + } + + static Functor i = functor(LogicTest::i); + + static Int i(Integer x) { + return term(i, x); + } + + static Int iv(String name) { + return var(Int.class, name); + } + + Int mOne = i(-1); + Int zero = i(0); + Int one = i(1); + + Int U = iv("U"); + Int V = iv("V"); + Int W = iv("W"); + Int X = iv("X"); + Int Y = iv("Y"); + Int Z = iv("Z"); + + // Plus + + interface Pred extends Term { + } + + static Functor plus = functor(LogicTest::plus, (Int a, Int b, Int c) -> Set. of()); + + static Pred plus(Int a, Int b, Int r) { + return term(plus, a, b, r); + } + + // FamilyTree interface Person extends Term { } @@ -101,24 +143,30 @@ static AncestorDescendent ancestorDescendentVar(String name) { return var(AncestorDescendent.class, name); } + // Variables + + Person A = personVar("A"); // Ancestor + Person D = personVar("D"); // Descendent + Person R = personVar("R"); // Relative + Person B = personVar("B"); // Relative1 + Person C = personVar("C"); // Relative2 + + // Terms + + Person Carel = person("Carel"); + Person Jan = person("Jan"); + Person Elske = person("Elske"); + Person Wim = person("Wim"); + Person Joppe = person("Joppe"); + Person Heleen = person("Heleen"); + Person Marijn = person("Marijn"); + @RepeatedTest(100) public void test0() { run(() -> { - Person A = personVar("A"); // Ancestor - Person D = personVar("D"); // Descendent - Person R = personVar("R"); // Relative - rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); - Person Carel = person("Carel"); - Person Jan = person("Jan"); - Person Elske = person("Elske"); - Person Wim = person("Wim"); - Person Joppe = person("Joppe"); - Person Heleen = person("Heleen"); - Person Marijn = person("Marijn"); - fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); fact(parentChild(Elske, Wim)); @@ -147,17 +195,9 @@ public void test0() { @RepeatedTest(100) public void test1() { run(() -> { - Person A = personVar("A"); // Ancestor - Person D = personVar("D"); // Descendent - Person R = personVar("R"); // Relative - rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); - Person Carel = person("Carel"); - Person Jan = person("Jan"); - Person Wim = person("Wim"); - fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); @@ -175,11 +215,6 @@ public void test1() { @RepeatedTest(100) public void test2() { run(() -> { - Person A = personVar("A"); // Ancestor - Person D = personVar("D"); // Descendent - Person B = personVar("B"); // Relative1 - Person C = personVar("C"); // Relative2 - rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), parentChild(A, B), parentChild(B, D)); rule(ancestorDescendent(A, D), parentChild(A, B), ancestorDescendent(B, C), parentChild(C, D)); @@ -191,24 +226,27 @@ public void test2() { fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); - hasResult(Set.of(bind(A, Jan), bind(A, Carel)), ancestorDescendent(A, Wim)); - hasResult(Set.of(bind(D, Jan), bind(D, Wim)), ancestorDescendent(Carel, D)); + hasResult(set(bind(A, Jan), bind(A, Carel)), ancestorDescendent(A, Wim)); + hasResult(set(bind(D, Jan), bind(D, Wim)), ancestorDescendent(Carel, D)); }); } @RepeatedTest(100) public void test3() { run(() -> { - Person P = personVar("P"); - Person C = personVar("C"); - - rule(parentChild(P, C), parentChild(P, C)); + rule(parentChild(B, C), parentChild(B, C)); Person Jan = person("Jan"); Person Wim = person("Wim"); - hasResult(Set.of(incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))), parentChild(Wim, Jan)); + hasResult(set(incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))), parentChild(Wim, Jan)); }); } + @RepeatedTest(100) + public void test4() { + run(() -> { + rule(plus(zero, zero, zero)); + }); + } } From afd8e2877fd391ac035a33f34883dd507b06a40a Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 28 Nov 2024 16:05:24 +0100 Subject: [PATCH 109/179] only run when not more then on unknown variable --- .../java/org/modelingvalue/dclare/Logic.java | 73 ++++++++++++++----- .../modelingvalue/dclare/test/LogicTest.java | 14 ++-- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 946d7255..4bef3869 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -385,8 +385,28 @@ public static interface Term { } @SuppressWarnings("unchecked") - public static F term(Functor functor, Object... args) { - return new TermImpl(functor, args).proxy(); + public static F term(Functor0 functor) { + return new TermImpl(functor).proxy(); + } + + @SuppressWarnings("unchecked") + public static F term(Functor1 functor, A a) { + return new TermImpl(functor, a).proxy(); + } + + @SuppressWarnings("unchecked") + public static F term(Functor2 functor, A a, B b) { + return new TermImpl(functor, a, b).proxy(); + } + + @SuppressWarnings("unchecked") + public static F term(Functor3 functor, A a, B b, C c) { + return new TermImpl(functor, a, b, c).proxy(); + } + + @SuppressWarnings("unchecked") + public static F term(Functor4 functor, A a, B b, C c, D d) { + return new TermImpl(functor, a, b, c, d).proxy(); } private static TermImpl termImpl(FunctImpl functor, Object... args) { @@ -445,24 +465,33 @@ protected FunctImpl functor() { @SuppressWarnings("rawtypes") protected final void makeFact() { FACTS.force(this, ADD_FACT, this); - patterns(1, toArray(), 2); + Object[] array = toArray(); + if (USE_EXTEND) { + patterns(1, array); + } else { + Object v; + for (int i = 1; i < array.length; i++) { + v = array[i]; + array[i] = null; + FACTS.force(term(array), ADD_FACT, this); + array[i] = v; + } + } } - private void patterns(int i, Object[] array, int nrOfNulls) { + private void patterns(int i, Object[] array) { if (i < length()) { array = array.clone(); if (array[i] == null) { array[i] = get(i); FACTS.force(term(array), ADD_FACT, this); } - patterns(i + 1, array, nrOfNulls); + patterns(i + 1, array); if (array[i] != null) { array[i] = null; - if (USE_EXTEND || nrOfNulls < array.length) { - FACTS.force(term(array), ADD_FACT, this); - } + FACTS.force(term(array), ADD_FACT, this); } - patterns(i + 1, array, nrOfNulls + 1); + patterns(i + 1, array); } } @@ -513,7 +542,7 @@ protected TermImpl setBinding(Map vars) { @SuppressWarnings({"rawtypes", "unchecked"}) protected Collection match(List der) { int non = nrOfNulls(); - if (!USE_EXTEND && non == length() - 1) { + if (!USE_EXTEND && (non > 1 || non >= length() - 1)) { return Set.of(incomplete(der.append(this))); } else { Set facts = FACTS.get(this); @@ -539,6 +568,9 @@ protected Collection match(List der) { if (non < 2 && non < length() - 1) { Set set = r.asSet(); FACTS.force(this, set); + for (TermImpl e : set) { + FACTS.force(e, Set.of(e)); + } return set; } else { return r; @@ -556,7 +588,7 @@ protected Collection match(List der) { @SuppressWarnings("rawtypes") protected int termPrio(List der) { int non = nrOfNulls(); - if (!USE_EXTEND && non == length() - 1) { + if (!USE_EXTEND && (non > 1 || non >= length() - 1)) { return Integer.MAX_VALUE; } else { Set facts = FACTS.get(this); @@ -788,10 +820,11 @@ public interface Incomplete extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete, null); - private static final Functor INCOMPLETE_FUNCTOR_PROXY = INCOMPLETE_FUNCTOR.proxy(); - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); - private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); + private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete, null); + @SuppressWarnings("rawtypes") + private static final Functor1 INCOMPLETE_FUNCTOR_PROXY = (Functor1) INCOMPLETE_FUNCTOR.proxy(); + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); + private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); @SuppressWarnings("unchecked") public static Incomplete incompleteVar() { @@ -823,15 +856,15 @@ public interface L extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); + private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); + private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); @SuppressWarnings("rawtypes") - private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); + private static final Functor2 LIST_FUNCTOR_2_PROXY = (Functor2) LIST_FUNCTOR_2.proxy(); @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); + private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); @SuppressWarnings("rawtypes") - private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); + private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); @SuppressWarnings("unchecked") public static L l(E head, L tail) { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 9a1db842..3befdbc0 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -30,7 +30,9 @@ import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; -import org.modelingvalue.dclare.Logic.Functor; +import org.modelingvalue.dclare.Logic.Functor1; +import org.modelingvalue.dclare.Logic.Functor2; +import org.modelingvalue.dclare.Logic.Functor3; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; @@ -70,7 +72,7 @@ static Set> set(Map... bindings) { interface Int extends Term { } - static Functor i = functor(LogicTest::i); + static Functor1 i = functor(LogicTest::i); static Int i(Integer x) { return term(i, x); @@ -96,7 +98,7 @@ static Int iv(String name) { interface Pred extends Term { } - static Functor plus = functor(LogicTest::plus, (Int a, Int b, Int c) -> Set. of()); + static Functor3 plus = functor(LogicTest::plus, (Int a, Int b, Int c) -> Set. of()); static Pred plus(Int a, Int b, Int r) { return term(plus, a, b, r); @@ -107,7 +109,7 @@ static Pred plus(Int a, Int b, Int r) { interface Person extends Term { } - static Functor person = functor(LogicTest::person); + static Functor1 person = functor(LogicTest::person); static Person person(String name) { return term(person, name); @@ -120,7 +122,7 @@ static Person personVar(String name) { interface ParentChild extends Term { } - static Functor parentChild = functor(LogicTest::parentChild); + static Functor2 parentChild = functor(LogicTest::parentChild); static ParentChild parentChild(Person parent, Person child) { return term(parentChild, parent, child); @@ -133,7 +135,7 @@ static ParentChild parentChildVar(String name) { interface AncestorDescendent extends Term { } - static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); + static Functor2 ancestorDescendent = functor(LogicTest::ancestorDescendent); static AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { return term(ancestorDescendent, ancestor, descendent); From 07c42491476dafffa7f6e4fced3ca80b90c3a057 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 28 Nov 2024 17:03:32 +0100 Subject: [PATCH 110/179] lambdas in logic --- .../java/org/modelingvalue/dclare/Logic.java | 126 +++++++++++------- .../modelingvalue/dclare/test/LogicTest.java | 29 +++- 2 files changed, 103 insertions(+), 52 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 4bef3869..0b9d52fc 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -26,6 +26,8 @@ import java.util.Arrays; import java.util.Objects; import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.function.Supplier; import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Entry; @@ -33,16 +35,11 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; -import org.modelingvalue.collections.util.LambdaReflection; -import org.modelingvalue.collections.util.SerializableBiFunction; +import org.modelingvalue.collections.util.*; import org.modelingvalue.collections.util.SerializableBiFunction.SerializableBiFunctionImpl; -import org.modelingvalue.collections.util.SerializableFunction; import org.modelingvalue.collections.util.SerializableFunction.SerializableFunctionImpl; -import org.modelingvalue.collections.util.SerializableQuadFunction; import org.modelingvalue.collections.util.SerializableQuadFunction.SerializableQuadFunctionImpl; -import org.modelingvalue.collections.util.SerializableSupplier; import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; -import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; public final class Logic { @@ -80,11 +77,13 @@ private static abstract class ClauseImpl extends StructImpl implements Invoca private static final Method EQUALS; private static final Method HASHCODE; private static final Method TO_STRING; + private static final Method GET; static { try { EQUALS = Object.class.getMethod("equals", Object.class); HASHCODE = Object.class.getMethod("hashCode"); TO_STRING = Object.class.getMethod("toString"); + GET = Term.class.getMethod("get", Integer.class); } catch (NoSuchMethodException | SecurityException e) { throw new Error(e); } @@ -107,6 +106,8 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl return super.hashCode(); } else if (method.equals(TO_STRING)) { return toString(); + } else if (method.equals(GET)) { + return get((Integer) args[0]); } else { throw new Error("No handler for " + method); } @@ -154,6 +155,13 @@ private static final Object[] unproxy(Functor functor, Object[] args) { protected abstract ClauseImpl term(Object[] array); } + private static final Object[] proxy(Object[] array) { + for (int i = 0; i < array.length; i++) { + array[i] = Logic.proxy(array[i]); + } + return array; + } + private static final Object noProxy(Object object) { if (object instanceof Term) { throw new IllegalArgumentException(); @@ -195,13 +203,13 @@ public interface Functor0 extends Functor { } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableSupplier method, SerializableSupplier> impl) { + private static FunctImpl functImpl(SerializableSupplier method, SerializableSupplier> impl) { SerializableSupplierImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } @SuppressWarnings("unchecked") - public static Functor0 functor(SerializableSupplier method, SerializableSupplier> impl) { + public static Functor0 functor(SerializableSupplier method, SerializableSupplier> impl) { return (Functor0) functImpl(method, impl).proxy(); } @@ -211,17 +219,16 @@ public static Functor0 functor(SerializableSupplier method) { } public interface Functor1 extends Functor0 { - A get1(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableFunction method, SerializableFunction> impl) { + private static FunctImpl functImpl(SerializableFunction method, SerializableFunction> impl) { SerializableFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } @SuppressWarnings("unchecked") - public static Functor1 functor(SerializableFunction method, SerializableFunction> impl) { + public static Functor1 functor(SerializableFunction method, SerializableFunction> impl) { return (Functor1) functImpl(method, impl).proxy(); } @@ -231,17 +238,16 @@ public static Functor1 functor(SerializableFunction method) { } public interface Functor2 extends Functor1 { - B get2(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableBiFunction method, SerializableBiFunction> impl) { + private static FunctImpl functImpl(SerializableBiFunction method, SerializableBiFunction> impl) { SerializableBiFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } @SuppressWarnings("unchecked") - public static Functor2 functor(SerializableBiFunction method, SerializableBiFunction> impl) { + public static Functor2 functor(SerializableBiFunction method, SerializableBiFunction> impl) { return (Functor2) functImpl(method, impl.of()).proxy(); } @@ -251,17 +257,16 @@ public static Functor2 functor(SerializableBiFunction extends Functor2 { - C get3(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableTriFunction method, SerializableTriFunction> impl) { + private static FunctImpl functImpl(SerializableTriFunction method, SerializableTriFunction> impl) { SerializableTriFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } @SuppressWarnings("unchecked") - public static Functor3 functor(SerializableTriFunction method, SerializableTriFunction> impl) { + public static Functor3 functor(SerializableTriFunction method, SerializableTriFunction> impl) { return (Functor3) functImpl(method, impl).proxy(); } @@ -271,17 +276,16 @@ public static Functor3 functor(SerializableTriFunction< } public interface Functor4 extends Functor3 { - D get4(); } @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableQuadFunction method, SerializableQuadFunction> impl) { + private static FunctImpl functImpl(SerializableQuadFunction method, SerializableQuadFunction> impl) { SerializableQuadFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } @SuppressWarnings("unchecked") - public static Functor4 functor(SerializableQuadFunction method, SerializableQuadFunction> impl) { + public static Functor4 functor(SerializableQuadFunction method, SerializableQuadFunction> impl) { return (Functor4) functImpl(method, impl).proxy(); } @@ -295,7 +299,7 @@ private static final class FunctImpl extends ClauseImpl> { @SuppressWarnings({"unchecked", "rawtypes"}) private FunctImpl(Class type, String name, List> args, LambdaReflection l) { - super((Class) Functor.class, type, name, args); + super((Class) Functor.class, type, name, args, l); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -328,6 +332,11 @@ protected Class> type() { return (Class>) get(0); } + @SuppressWarnings("unchecked") + protected LambdaReflection lambda() { + return (LambdaReflection) get(4); + } + @SuppressWarnings("unchecked") protected Class functType() { return (Class) get(1); @@ -382,6 +391,7 @@ protected Class type() { // Terms public static interface Term { + Object get(Integer i); } @SuppressWarnings("unchecked") @@ -542,42 +552,62 @@ protected TermImpl setBinding(Map vars) { @SuppressWarnings({"rawtypes", "unchecked"}) protected Collection match(List der) { int non = nrOfNulls(); - if (!USE_EXTEND && (non > 1 || non >= length() - 1)) { + int len = length(); + if (!USE_EXTEND && (non > 1 || non >= len - 1)) { return Set.of(incomplete(der.append(this))); } else { Set facts = FACTS.get(this); if (facts == null) { - List rules = RULES.get(functor()); - if (rules != null) { - int i = der.lastIndexOf(this); - if (i >= 0) { - return Set.of(incomplete(der.sublist(i, der.size()).append(this))); + FunctImpl functor = functor(); + LambdaReflection lambda = functor.lambda(); + if (lambda != null) { + Object[] array = Logic.proxy(toArray()); + if (len == 1) { + return ((Collection) ((Supplier) lambda.original()).get()).map(Logic::unproxy); + } else if (len == 2) { + return ((Collection) ((Function) lambda.original()).apply(array[1])).map(Logic::unproxy); + } else if (len == 3) { + return ((Collection) ((BiFunction) lambda.original()).apply(array[1], array[2])).map(Logic::unproxy); + } else if (len == 4) { + return ((Collection) ((TriFunction) lambda.original()).apply(array[1], array[2], array[3])).map(Logic::unproxy); + } else if (len == 5) { + return ((Collection) ((QuadFunction) lambda.original()).apply(array[1], array[2], array[3], array[4])).map(Logic::unproxy); } else { - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this, der.append(this)); - if (non == 0) { - eval = eval.asSet(); - if (eval.equals(Set.of(this))) { - r = eval; - break; + return Set.of(incomplete(List.of(this))); + } + } else { + List rules = RULES.get(functor); + if (rules != null) { + int i = der.lastIndexOf(this); + if (i >= 0) { + return Set.of(incomplete(der.sublist(i, der.size()).append(this))); + } else { + Collection r = Set.of(); + for (RuleImpl rule : rules) { + Collection eval = rule.eval(this, der.append(this)); + if (non == 0) { + eval = eval.asSet(); + if (eval.equals(Set.of(this))) { + r = eval; + break; + } } + r = Collection.concat(r, eval); } - r = Collection.concat(r, eval); - } - if (non < 2 && non < length() - 1) { - Set set = r.asSet(); - FACTS.force(this, set); - for (TermImpl e : set) { - FACTS.force(e, Set.of(e)); + if (non < 2 && non < len - 1) { + Set set = r.asSet(); + FACTS.force(this, set); + for (TermImpl e : set) { + FACTS.force(e, Set.of(e)); + } + return set; + } else { + return r; } - return set; - } else { - return r; } + } else { + return Set.of(); } - } else { - return Set.of(); } } else { return facts; @@ -846,7 +876,7 @@ private static TermImpl incomplete(TermImpl der) { } @SuppressWarnings({"unchecked", "rawtypes"}) - private static Incomplete incomplete(L der) { + public static Incomplete incomplete(L der) { return term(INCOMPLETE_FUNCTOR_PROXY, der); } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 3befdbc0..a39c0e4d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -24,6 +24,7 @@ import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; +import java.math.BigInteger; import java.util.concurrent.ThreadLocalRandom; import org.junit.jupiter.api.RepeatedTest; @@ -72,12 +73,16 @@ static Set> set(Map... bindings) { interface Int extends Term { } - static Functor1 i = functor(LogicTest::i); + static Functor1 i = functor(LogicTest::i); - static Int i(Integer x) { + static Int i(BigInteger x) { return term(i, x); } + static Int i(long x) { + return i(BigInteger.valueOf(x)); + } + static Int iv(String name) { return var(Int.class, name); } @@ -98,7 +103,23 @@ static Int iv(String name) { interface Pred extends Term { } - static Functor3 plus = functor(LogicTest::plus, (Int a, Int b, Int c) -> Set. of()); + @SuppressWarnings({"unchecked", "rawtypes"}) + static Functor3 plus = functor(LogicTest::plus, (Int a, Int b, Int c) -> { + BigInteger ai = a != null ? (BigInteger) a.get(1) : null; + BigInteger bi = b != null ? (BigInteger) b.get(1) : null; + BigInteger ci = c != null ? (BigInteger) c.get(1) : null; + if (ai != null && bi != null && ci != null) { + return ai.add(bi).equals(ci) ? Set.of(plus(a, b, c)) : Set.of(); + } else if (ai != null && bi != null && ci == null) { + return Set.of(plus(i(ai), i(bi), i(ai.add(bi)))); + } else if (ai != null && bi == null && ci != null) { + return Set.of(plus(i(ai), i(ci.subtract(ai)), i(ci))); + } else if (ai == null && bi != null && ci != null) { + return Set.of(plus(i(ci.subtract(bi)), i(bi), i(ci))); + } else { + return (Set) Set.of(incomplete(l(plus(a, b, c)))); + } + }); static Pred plus(Int a, Int b, Int r) { return term(plus, a, b, r); @@ -248,7 +269,7 @@ public void test3() { @RepeatedTest(100) public void test4() { run(() -> { - rule(plus(zero, zero, zero)); + isTrue(plus(one, zero, one)); }); } } From eef5f9129e00067d80bdd7b3bcdcb96e4ab74fa9 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 29 Nov 2024 15:49:19 +0100 Subject: [PATCH 111/179] simplified --- .../java/org/modelingvalue/dclare/Logic.java | 213 +++++++----------- .../modelingvalue/dclare/test/LogicTest.java | 34 +-- 2 files changed, 100 insertions(+), 147 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 0b9d52fc..2ff9ae9c 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -23,11 +23,8 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import java.util.Arrays; import java.util.Objects; import java.util.function.BiFunction; -import java.util.function.Function; -import java.util.function.Supplier; import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Entry; @@ -35,11 +32,15 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; -import org.modelingvalue.collections.util.*; +import org.modelingvalue.collections.util.SerializableBiFunction; import org.modelingvalue.collections.util.SerializableBiFunction.SerializableBiFunctionImpl; +import org.modelingvalue.collections.util.SerializableFunction; import org.modelingvalue.collections.util.SerializableFunction.SerializableFunctionImpl; +import org.modelingvalue.collections.util.SerializableQuadFunction; import org.modelingvalue.collections.util.SerializableQuadFunction.SerializableQuadFunctionImpl; +import org.modelingvalue.collections.util.SerializableSupplier; import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; +import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; public final class Logic { @@ -71,19 +72,17 @@ private Logic() { @SuppressWarnings("rawtypes") private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); - private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { + private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; private static final Method EQUALS; private static final Method HASHCODE; private static final Method TO_STRING; - private static final Method GET; static { try { EQUALS = Object.class.getMethod("equals", Object.class); HASHCODE = Object.class.getMethod("hashCode"); TO_STRING = Object.class.getMethod("toString"); - GET = Term.class.getMethod("get", Integer.class); } catch (NoSuchMethodException | SecurityException e) { throw new Error(e); } @@ -106,8 +105,6 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl return super.hashCode(); } else if (method.equals(TO_STRING)) { return toString(); - } else if (method.equals(GET)) { - return get((Integer) args[0]); } else { throw new Error("No handler for " + method); } @@ -155,13 +152,6 @@ private static final Object[] unproxy(Functor functor, Object[] args) { protected abstract ClauseImpl term(Object[] array); } - private static final Object[] proxy(Object[] array) { - for (int i = 0; i < array.length; i++) { - array[i] = Logic.proxy(array[i]); - } - return array; - } - private static final Object noProxy(Object object) { if (object instanceof Term) { throw new IllegalArgumentException(); @@ -199,106 +189,91 @@ private static final Object proxy(Object object) { public interface Functor extends Term { } - public interface Functor0 extends Functor { - } - - @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableSupplier method, SerializableSupplier> impl) { + @SuppressWarnings({"unchecked", "rawtypes"}) + private static FunctImpl functImpl(SerializableSupplier method, SerializableFunction, Collection> impl) { SerializableSupplierImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - @SuppressWarnings("unchecked") - public static Functor0 functor(SerializableSupplier method, SerializableSupplier> impl) { - return (Functor0) functImpl(method, impl).proxy(); + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Functor functor(SerializableSupplier method, SerializableFunction, Collection> impl) { + return functImpl(method, impl).proxy(); } @SuppressWarnings("unchecked") - public static Functor0 functor(SerializableSupplier method) { - return (Functor0) functImpl(method, null).proxy(); - } - - public interface Functor1 extends Functor0 { + public static Functor functor(SerializableSupplier method) { + return functImpl(method, null).proxy(); } - @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableFunction method, SerializableFunction> impl) { + @SuppressWarnings({"unchecked", "rawtypes"}) + private static FunctImpl functImpl(SerializableFunction method, SerializableFunction, Collection> impl) { SerializableFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - @SuppressWarnings("unchecked") - public static Functor1 functor(SerializableFunction method, SerializableFunction> impl) { - return (Functor1) functImpl(method, impl).proxy(); + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Functor functor(SerializableFunction method, SerializableFunction, Collection> impl) { + return functImpl(method, impl).proxy(); } @SuppressWarnings("unchecked") - public static Functor1 functor(SerializableFunction method) { - return (Functor1) functImpl(method, null).proxy(); + public static Functor functor(SerializableFunction method) { + return functImpl(method, null).proxy(); } - public interface Functor2 extends Functor1 { - } - - @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableBiFunction method, SerializableBiFunction> impl) { + @SuppressWarnings({"unchecked", "rawtypes"}) + private static FunctImpl functImpl(SerializableBiFunction method, SerializableFunction, Collection> impl) { SerializableBiFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - @SuppressWarnings("unchecked") - public static Functor2 functor(SerializableBiFunction method, SerializableBiFunction> impl) { - return (Functor2) functImpl(method, impl.of()).proxy(); + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Functor functor(SerializableBiFunction method, SerializableFunction, Collection> impl) { + return functImpl(method, impl.of()).proxy(); } @SuppressWarnings("unchecked") - public static Functor2 functor(SerializableBiFunction method) { - return (Functor2) functImpl(method, null).proxy(); - } - - public interface Functor3 extends Functor2 { + public static Functor functor(SerializableBiFunction method) { + return functImpl(method, null).proxy(); } - @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableTriFunction method, SerializableTriFunction> impl) { + @SuppressWarnings({"unchecked", "rawtypes"}) + private static FunctImpl functImpl(SerializableTriFunction method, SerializableFunction, Collection> impl) { SerializableTriFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - @SuppressWarnings("unchecked") - public static Functor3 functor(SerializableTriFunction method, SerializableTriFunction> impl) { - return (Functor3) functImpl(method, impl).proxy(); + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Functor functor(SerializableTriFunction method, SerializableFunction, Collection> impl) { + return functImpl(method, impl).proxy(); } @SuppressWarnings("unchecked") - public static Functor3 functor(SerializableTriFunction method) { - return (Functor3) functImpl(method, null).proxy(); - } - - public interface Functor4 extends Functor3 { + public static Functor functor(SerializableTriFunction method) { + return functImpl(method, null).proxy(); } - @SuppressWarnings("unchecked") - private static FunctImpl functImpl(SerializableQuadFunction method, SerializableQuadFunction> impl) { + @SuppressWarnings({"unchecked", "rawtypes"}) + private static FunctImpl functImpl(SerializableQuadFunction method, SerializableFunction, Collection> impl) { SerializableQuadFunctionImpl l = method.of(); return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); } - @SuppressWarnings("unchecked") - public static Functor4 functor(SerializableQuadFunction method, SerializableQuadFunction> impl) { - return (Functor4) functImpl(method, impl).proxy(); + @SuppressWarnings({"unchecked", "rawtypes"}) + public static Functor functor(SerializableQuadFunction method, SerializableFunction, Collection> impl) { + return functImpl(method, impl).proxy(); } @SuppressWarnings("unchecked") - public static Functor4 functor(SerializableQuadFunction method) { - return (Functor4) functImpl(method, null).proxy(); + public static Functor functor(SerializableQuadFunction method) { + return functImpl(method, null).proxy(); } - private static final class FunctImpl extends ClauseImpl> { + private static final class FunctImpl extends ClauseImpl> { private static final long serialVersionUID = 285147889847599160L; @SuppressWarnings({"unchecked", "rawtypes"}) - private FunctImpl(Class type, String name, List> args, LambdaReflection l) { + private FunctImpl(Class type, String name, List> args, SerializableFunction, Collection> l) { super((Class) Functor.class, type, name, args, l); } @@ -310,9 +285,7 @@ private FunctImpl(Object[] args) { @Override @SuppressWarnings({"unchecked", "rawtypes"}) protected final Functor proxy() { - int l = length() - 1; - Class f = l == 0 ? Functor0.class : l == 1 ? Functor1.class : l == 2 ? Functor2.class : l == 3 ? Functor3.class : Functor4.class; - return (Functor) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{f}, this); + return (Functor) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Functor.class}, this); } @Override @@ -332,9 +305,9 @@ protected Class> type() { return (Class>) get(0); } - @SuppressWarnings("unchecked") - protected LambdaReflection lambda() { - return (LambdaReflection) get(4); + @SuppressWarnings({"unchecked", "rawtypes"}) + protected SerializableFunction, Collection> lambda() { + return (SerializableFunction, Collection>) get(4); } @SuppressWarnings("unchecked") @@ -349,11 +322,11 @@ public static interface Variable extends Term { } @SuppressWarnings("unchecked") - public static F var(Class type, String id) { + public static F var(Class type, String id) { return new VarImpl(type, id).proxy(); } - private static final class VarImpl extends ClauseImpl { + private static final class VarImpl extends ClauseImpl { private static final long serialVersionUID = -8998368070388908726L; private VarImpl(Class type, String name) { @@ -391,39 +364,18 @@ protected Class type() { // Terms public static interface Term { - Object get(Integer i); - } - - @SuppressWarnings("unchecked") - public static F term(Functor0 functor) { - return new TermImpl(functor).proxy(); - } - - @SuppressWarnings("unchecked") - public static F term(Functor1 functor, A a) { - return new TermImpl(functor, a).proxy(); - } - - @SuppressWarnings("unchecked") - public static F term(Functor2 functor, A a, B b) { - return new TermImpl(functor, a, b).proxy(); - } - - @SuppressWarnings("unchecked") - public static F term(Functor3 functor, A a, B b, C c) { - return new TermImpl(functor, a, b, c).proxy(); } @SuppressWarnings("unchecked") - public static F term(Functor4 functor, A a, B b, C c, D d) { - return new TermImpl(functor, a, b, c, d).proxy(); + public static F term(Functor functor, Object... args) { + return new TermImpl(functor, args).proxy(); } private static TermImpl termImpl(FunctImpl functor, Object... args) { return new TermImpl(functor, args); } - private static class TermImpl extends ClauseImpl { + public static class TermImpl extends ClauseImpl { private static final long serialVersionUID = -1605559565948158856L; private TermImpl(Functor functor, Object... args) { @@ -447,7 +399,7 @@ protected F proxy() { @Override @SuppressWarnings("unchecked") protected TermImpl term(Object[] array) { - return new TermImpl((FunctImpl) array[0], Arrays.copyOfRange(array, 1, array.length)); + return new TermImpl(array); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -479,12 +431,10 @@ protected final void makeFact() { if (USE_EXTEND) { patterns(1, array); } else { - Object v; for (int i = 1; i < array.length; i++) { - v = array[i]; array[i] = null; FACTS.force(term(array), ADD_FACT, this); - array[i] = v; + array = toArray(); } } } @@ -533,6 +483,21 @@ protected Map getBinding(TermImpl term) { } } + @SuppressWarnings({"unchecked", "rawtypes"}) + public V get(int... is) { + Object v = this; + for (int i : is) { + v = v != null ? ((TermImpl) v).get(i) : null; + } + return (V) v; + } + + public TermImpl set(int i, Object v) { + Object[] array = toArray(); + array[i] = unproxy(v); + return term(array); + } + @SuppressWarnings("rawtypes") protected TermImpl setBinding(Map vars) { TermImpl inc = (TermImpl) vars.get(INCOMPLETE_VAR); @@ -559,22 +524,9 @@ protected Collection match(List der) { Set facts = FACTS.get(this); if (facts == null) { FunctImpl functor = functor(); - LambdaReflection lambda = functor.lambda(); + SerializableFunction, Collection> lambda = functor.lambda(); if (lambda != null) { - Object[] array = Logic.proxy(toArray()); - if (len == 1) { - return ((Collection) ((Supplier) lambda.original()).get()).map(Logic::unproxy); - } else if (len == 2) { - return ((Collection) ((Function) lambda.original()).apply(array[1])).map(Logic::unproxy); - } else if (len == 3) { - return ((Collection) ((BiFunction) lambda.original()).apply(array[1], array[2])).map(Logic::unproxy); - } else if (len == 4) { - return ((Collection) ((TriFunction) lambda.original()).apply(array[1], array[2], array[3])).map(Logic::unproxy); - } else if (len == 5) { - return ((Collection) ((QuadFunction) lambda.original()).apply(array[1], array[2], array[3], array[4])).map(Logic::unproxy); - } else { - return Set.of(incomplete(List.of(this))); - } + return lambda.apply(this); } else { List rules = RULES.get(functor); if (rules != null) { @@ -850,11 +802,10 @@ public interface Incomplete extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete, null); - @SuppressWarnings("rawtypes") - private static final Functor1 INCOMPLETE_FUNCTOR_PROXY = (Functor1) INCOMPLETE_FUNCTOR.proxy(); - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); - private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); + private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete, null); + private static final Functor INCOMPLETE_FUNCTOR_PROXY = INCOMPLETE_FUNCTOR.proxy(); + private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); + private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); @SuppressWarnings("unchecked") public static Incomplete incompleteVar() { @@ -871,7 +822,7 @@ private static TermImpl incomplete(List der) { } @SuppressWarnings({"unchecked", "rawtypes"}) - private static TermImpl incomplete(TermImpl der) { + public static TermImpl incomplete(TermImpl der) { return termImpl(INCOMPLETE_FUNCTOR, der); } @@ -886,15 +837,15 @@ public interface L extends Term { } @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); + private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); + private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); @SuppressWarnings("rawtypes") - private static final Functor2 LIST_FUNCTOR_2_PROXY = (Functor2) LIST_FUNCTOR_2.proxy(); + private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); + private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); @SuppressWarnings("rawtypes") - private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); + private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); @SuppressWarnings("unchecked") public static L l(E head, L tail) { @@ -912,7 +863,7 @@ public static L l(E... es) { } @SuppressWarnings({"unchecked", "rawtypes"}) - private static TermImpl list(E... es) { + public static TermImpl list(E... es) { TermImpl l = EMPTY_LIST; for (int i = es.length - 1; i >= 0; i--) { l = termImpl(LIST_FUNCTOR_2, unproxy(es[i]), l); diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index a39c0e4d..2258dbbd 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -31,9 +31,8 @@ import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; -import org.modelingvalue.dclare.Logic.Functor1; -import org.modelingvalue.dclare.Logic.Functor2; -import org.modelingvalue.dclare.Logic.Functor3; +import org.modelingvalue.collections.util.SerializableFunction; +import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; @@ -73,7 +72,7 @@ static Set> set(Map... bindings) { interface Int extends Term { } - static Functor1 i = functor(LogicTest::i); + static Functor i = functor((SerializableFunction) LogicTest::i); static Int i(BigInteger x) { return term(i, x); @@ -104,20 +103,20 @@ interface Pred extends Term { } @SuppressWarnings({"unchecked", "rawtypes"}) - static Functor3 plus = functor(LogicTest::plus, (Int a, Int b, Int c) -> { - BigInteger ai = a != null ? (BigInteger) a.get(1) : null; - BigInteger bi = b != null ? (BigInteger) b.get(1) : null; - BigInteger ci = c != null ? (BigInteger) c.get(1) : null; + static Functor plus = functor(LogicTest::plus, t -> { + BigInteger ai = t.get(1, 1); + BigInteger bi = t.get(2, 1); + BigInteger ci = t.get(3, 1); if (ai != null && bi != null && ci != null) { - return ai.add(bi).equals(ci) ? Set.of(plus(a, b, c)) : Set.of(); + return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); } else if (ai != null && bi != null && ci == null) { - return Set.of(plus(i(ai), i(bi), i(ai.add(bi)))); + return Set.of(t.set(3, i(ai.add(bi)))); } else if (ai != null && bi == null && ci != null) { - return Set.of(plus(i(ai), i(ci.subtract(ai)), i(ci))); + return Set.of(t.set(2, i(ci.subtract(ai)))); } else if (ai == null && bi != null && ci != null) { - return Set.of(plus(i(ci.subtract(bi)), i(bi), i(ci))); + return Set.of(t.set(1, i(ci.subtract(bi)))); } else { - return (Set) Set.of(incomplete(l(plus(a, b, c)))); + return Set.of(incomplete(list(t))); } }); @@ -130,7 +129,7 @@ static Pred plus(Int a, Int b, Int r) { interface Person extends Term { } - static Functor1 person = functor(LogicTest::person); + static Functor person = functor(LogicTest::person); static Person person(String name) { return term(person, name); @@ -143,7 +142,7 @@ static Person personVar(String name) { interface ParentChild extends Term { } - static Functor2 parentChild = functor(LogicTest::parentChild); + static Functor parentChild = functor(LogicTest::parentChild); static ParentChild parentChild(Person parent, Person child) { return term(parentChild, parent, child); @@ -156,7 +155,7 @@ static ParentChild parentChildVar(String name) { interface AncestorDescendent extends Term { } - static Functor2 ancestorDescendent = functor(LogicTest::ancestorDescendent); + static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); static AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { return term(ancestorDescendent, ancestor, descendent); @@ -270,6 +269,9 @@ public void test3() { public void test4() { run(() -> { isTrue(plus(one, zero, one)); + isTrue(plus(zero, one, one)); + isTrue(plus(zero, zero, zero)); + hasResult(set(bind(X, one)), plus(zero, one, X)); }); } } From 758a803986d0a3bddfe68c6cc4e75c371224ee2a Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 2 Dec 2024 12:13:14 +0100 Subject: [PATCH 112/179] nested terms in rules --- .../java/org/modelingvalue/dclare/Logic.java | 214 ++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 49 ++-- 2 files changed, 154 insertions(+), 109 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 2ff9ae9c..981785a2 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -65,7 +65,6 @@ private Logic() { return l.append(e); } }; - @SuppressWarnings("rawtypes") private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @@ -316,6 +315,55 @@ protected Class functType() { } } + // Lists + + public interface L extends Term { + } + + @SuppressWarnings("rawtypes") + private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); + @SuppressWarnings("rawtypes") + private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); + @SuppressWarnings("rawtypes") + private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); + @SuppressWarnings("rawtypes") + private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); + @SuppressWarnings("rawtypes") + private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); + + @SuppressWarnings("unchecked") + public static L l(E head, L tail) { + return term(LIST_FUNCTOR_2_PROXY, head, tail); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + public static L l() { + return EMPTY_LIST_PROXY; + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + public static L l(E... es) { + return list(es).proxy(); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static TermImpl list(E... es) { + TermImpl l = EMPTY_LIST; + for (int i = es.length - 1; i >= 0; i--) { + l = termImpl(LIST_FUNCTOR_2, unproxy(es[i]), l); + } + return l; + } + + @SuppressWarnings("rawtypes") + private static TermImpl list(List es) { + TermImpl l = EMPTY_LIST; + for (int i = es.size() - 1; i >= 0; i--) { + l = termImpl(LIST_FUNCTOR_2, unproxy(es.get(i)), l); + } + return l; + } + // Variables public static interface Variable extends Term { @@ -468,50 +516,75 @@ protected Map variables() { return vars; } - @SuppressWarnings("rawtypes") - protected Map getBinding(TermImpl term) { - if (term.type() == Incomplete.class) { - return Map.of(Entry.of(INCOMPLETE_VAR, term)); - } else { - Map vars = Map.of(); + @SuppressWarnings({"rawtypes", "unchecked"}) + protected Map getBinding(TermImpl term, Map vars) { + if (get(0).equals(term.get(0))) { for (int i = 1; i < length(); i++) { + Object tv = term.get(i); if (get(i) instanceof VarImpl) { - vars = vars.put((VarImpl) get(i), term.get(i)); + VarImpl var = (VarImpl) get(i); + Object vv = vars.get(var); + if (vv != null) { + if (tv != null && !tv.equals(vv)) { + return null; + } + } else if (tv != null) { + vars = vars.put(var, tv); + } + } else if (get(i) instanceof TermImpl) { + if (tv != null) { + TermImpl t = (TermImpl) get(i); + if (tv instanceof TermImpl) { + vars = t.getBinding((TermImpl) tv, vars); + if (vars == null) { + return null; + } + } else { + return null; + } + } + } else if (tv != null && !tv.equals(get(i))) { + return null; } } return vars; + } else { + return null; } } - @SuppressWarnings({"unchecked", "rawtypes"}) - public V get(int... is) { - Object v = this; - for (int i : is) { - v = v != null ? ((TermImpl) v).get(i) : null; + @SuppressWarnings({"rawtypes", "unchecked"}) + protected TermImpl setBinding(Map vars) { + Object[] array = toArray(); + for (int i = 1; i < length(); i++) { + if (get(i) instanceof VarImpl) { + array[i] = vars.get((VarImpl) get(i)); + } else if (get(i) instanceof TermImpl) { + array[i] = ((TermImpl) get(i)).setBinding(vars); + } } - return (V) v; + return term(array); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + public TermImpl getTerm(int i) { + return (TermImpl) super.get(i); + } + + @SuppressWarnings("unchecked") + public V getVal(int i) { + return (V) super.get(i); } public TermImpl set(int i, Object v) { Object[] array = toArray(); - array[i] = unproxy(v); + array[i] = v; return term(array); } - @SuppressWarnings("rawtypes") - protected TermImpl setBinding(Map vars) { - TermImpl inc = (TermImpl) vars.get(INCOMPLETE_VAR); - if (inc != null) { - return inc; - } else { - Object[] array = toArray(); - for (int i = 1; i < length(); i++) { - if (get(i) instanceof VarImpl) { - array[i] = vars.get((VarImpl) get(i)); - } - } - return term(array); - } + @SuppressWarnings({"rawtypes", "unchecked"}) + public Set incomplete() { + return Set.of(Logic.incomplete(Logic.list(this))); } @SuppressWarnings({"rawtypes", "unchecked"}) @@ -519,20 +592,19 @@ protected Collection match(List der) { int non = nrOfNulls(); int len = length(); if (!USE_EXTEND && (non > 1 || non >= len - 1)) { - return Set.of(incomplete(der.append(this))); + return Set.of(Logic.incomplete(der.append(this))); } else { Set facts = FACTS.get(this); if (facts == null) { - FunctImpl functor = functor(); - SerializableFunction, Collection> lambda = functor.lambda(); + SerializableFunction, Collection> lambda = functor().lambda(); if (lambda != null) { return lambda.apply(this); } else { - List rules = RULES.get(functor); + List rules = RULES.get(functor()); if (rules != null) { int i = der.lastIndexOf(this); if (i >= 0) { - return Set.of(incomplete(der.sublist(i, der.size()).append(this))); + return Set.of(Logic.incomplete(der.sublist(i, der.size()).append(this))); } else { Collection r = Set.of(); for (RuleImpl rule : rules) { @@ -666,10 +738,18 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection eval(TermImpl ptrn, List der) { + protected Collection eval(TermImpl term, List der) { TermImpl head = term(); - Collection> r = goal().eval(variables().putAll(head.getBinding(ptrn)), der); - return r.map(m -> head.setBinding(m)); + Map binding = head.getBinding(term, Map.of()); + if (binding == null) { + return Set.of(); + } else { + Collection> r = goal().eval(variables().putAll(binding), der); + return r.map(m -> { + TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); + return it != null ? it : head.setBinding(m); + }); + } } @Override @@ -757,7 +837,6 @@ protected List goals() { @SuppressWarnings({"rawtypes", "unchecked"}) private Collection> eval(List goals, Collection> vars, List der) { if (goals.isEmpty()) { - vars = vars.asSet(); return vars; } else { return vars.> flatMap(v -> { @@ -772,9 +851,13 @@ private Collection> eval(List goals, Collection m = f.match(der); - return eval(goals.removeIndex(i), m.map(t -> { - Map b = g.getBinding(t); - return b.containsKey(INCOMPLETE_VAR) ? b : v.putAll(b); + return eval(goals.removeIndex(i), m.> map(t -> { + if (t.type() == Incomplete.class) { + return Map.of(Entry.of(INCOMPLETE_VAR, t)); + } else { + Map b = g.getBinding(t, Map.of()); + return b == null ? Map.of() : v.putAll(b); + } }), der); } }); @@ -831,55 +914,6 @@ public static Incomplete incomplete(L der) { return term(INCOMPLETE_FUNCTOR_PROXY, der); } - // Lists - - public interface L extends Term { - } - - @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); - @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); - @SuppressWarnings("rawtypes") - private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); - @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); - @SuppressWarnings("rawtypes") - private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); - - @SuppressWarnings("unchecked") - public static L l(E head, L tail) { - return term(LIST_FUNCTOR_2_PROXY, head, tail); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static L l() { - return EMPTY_LIST_PROXY; - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static L l(E... es) { - return list(es).proxy(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static TermImpl list(E... es) { - TermImpl l = EMPTY_LIST; - for (int i = es.length - 1; i >= 0; i--) { - l = termImpl(LIST_FUNCTOR_2, unproxy(es[i]), l); - } - return l; - } - - @SuppressWarnings("rawtypes") - private static TermImpl list(List es) { - TermImpl l = EMPTY_LIST; - for (int i = es.size() - 1; i >= 0; i--) { - l = termImpl(LIST_FUNCTOR_2, unproxy(es.get(i)), l); - } - return l; - } - // Facts, Is public static void fact(Term term) { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 2258dbbd..1f669b25 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -34,6 +34,7 @@ import org.modelingvalue.collections.util.SerializableFunction; import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Term; +import org.modelingvalue.dclare.Logic.TermImpl; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -86,16 +87,20 @@ static Int iv(String name) { return var(Int.class, name); } - Int mOne = i(-1); - Int zero = i(0); - Int one = i(1); + Int mOne = i(-1); + Int zero = i(0); + Int one = i(1); - Int U = iv("U"); - Int V = iv("V"); - Int W = iv("W"); - Int X = iv("X"); - Int Y = iv("Y"); - Int Z = iv("Z"); + Int seven = i(7); + Int three = i(3); + Int ten = i(10); + + Int U = iv("U"); + Int V = iv("V"); + Int W = iv("W"); + Int X = iv("X"); + Int Y = iv("Y"); + Int Z = iv("Z"); // Plus @@ -104,19 +109,22 @@ interface Pred extends Term { @SuppressWarnings({"unchecked", "rawtypes"}) static Functor plus = functor(LogicTest::plus, t -> { - BigInteger ai = t.get(1, 1); - BigInteger bi = t.get(2, 1); - BigInteger ci = t.get(3, 1); + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + BigInteger ci = ct != null ? ct.getVal(1) : null; if (ai != null && bi != null && ci != null) { return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); } else if (ai != null && bi != null && ci == null) { - return Set.of(t.set(3, i(ai.add(bi)))); + return Set.of(t.set(3, at.set(1, ai.add(bi)))); } else if (ai != null && bi == null && ci != null) { - return Set.of(t.set(2, i(ci.subtract(ai)))); + return Set.of(t.set(2, at.set(1, ci.subtract(ai)))); } else if (ai == null && bi != null && ci != null) { - return Set.of(t.set(1, i(ci.subtract(bi)))); + return Set.of(t.set(1, bt.set(1, ci.subtract(bi)))); } else { - return Set.of(incomplete(list(t))); + return t.incomplete(); } }); @@ -268,10 +276,13 @@ public void test3() { @RepeatedTest(100) public void test4() { run(() -> { - isTrue(plus(one, zero, one)); - isTrue(plus(zero, one, one)); isTrue(plus(zero, zero, zero)); - hasResult(set(bind(X, one)), plus(zero, one, X)); + isTrue(plus(one, zero, one)); + isTrue(plus(seven, three, ten)); + hasResult(set(bind(X, ten)), plus(seven, three, X)); + hasResult(set(bind(X, three)), plus(seven, X, ten)); + hasResult(set(bind(X, seven)), plus(X, three, ten)); }); } + } From a58ab8e8c178d7540a4e6d3987664aa84efd8c3f Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 2 Dec 2024 15:18:10 +0100 Subject: [PATCH 113/179] working nested terms --- .../java/org/modelingvalue/dclare/Logic.java | 56 ++++++-- .../modelingvalue/dclare/test/LogicTest.java | 125 ++++++++++++++---- 2 files changed, 144 insertions(+), 37 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 981785a2..8f9017a9 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -268,7 +268,7 @@ public static Functor functor(SerializableQuadFu return functImpl(method, null).proxy(); } - private static final class FunctImpl extends ClauseImpl> { + public static final class FunctImpl extends ClauseImpl> { private static final long serialVersionUID = 285147889847599160L; @SuppressWarnings({"unchecked", "rawtypes"}) @@ -461,14 +461,23 @@ public String toString() { } } + public boolean isAtom() { + for (int i = 1; i < length(); i++) { + if (get(i) instanceof TermImpl) { + return false; + } + } + return true; + } + @SuppressWarnings("unchecked") @Override - protected Class type() { + public Class type() { return functor().functType(); } @SuppressWarnings({"unchecked", "rawtypes"}) - protected FunctImpl functor() { + public FunctImpl functor() { return (FunctImpl) get(0); } @@ -480,7 +489,7 @@ protected final void makeFact() { patterns(1, array); } else { for (int i = 1; i < array.length; i++) { - array[i] = null; + array[i] = getType(i); FACTS.force(term(array), ADD_FACT, this); array = toArray(); } @@ -496,7 +505,7 @@ private void patterns(int i, Object[] array) { } patterns(i + 1, array); if (array[i] != null) { - array[i] = null; + array[i] = getType(i); FACTS.force(term(array), ADD_FACT, this); } patterns(i + 1, array); @@ -508,7 +517,7 @@ protected Map variables() { Map vars = Map.of(); for (int i = 1; i < length(); i++) { if (get(i) instanceof VarImpl) { - vars = vars.put((VarImpl) get(i), null); + vars = vars.put((VarImpl) get(i), ((VarImpl) get(i)).type()); } else if (get(i) instanceof TermImpl) { vars = vars.putAll(((TermImpl) get(i)).variables()); } @@ -521,19 +530,33 @@ protected Map getBinding(TermImpl term, Map if (get(0).equals(term.get(0))) { for (int i = 1; i < length(); i++) { Object tv = term.get(i); + Class tt = tv instanceof TermImpl ? ((TermImpl) tv).type() : tv instanceof Class ? (Class) tv : null; + tv = tv instanceof Class ? null : tv; if (get(i) instanceof VarImpl) { VarImpl var = (VarImpl) get(i); Object vv = vars.get(var); + Class vt = vv instanceof TermImpl ? ((TermImpl) vv).type() : vv instanceof Class ? (Class) vv : null; + vv = vv instanceof Class ? null : vv; if (vv != null) { if (tv != null && !tv.equals(vv)) { return null; } } else if (tv != null) { - vars = vars.put(var, tv); + if (var.type().isAssignableFrom(tt)) { + vars = vars.put(var, tv); + } else { + return null; + } + } else if (tt == null || !var.type().isAssignableFrom(tt)) { + return null; + } else if (vt != null && !vt.equals(tt)) { + return null; + } else { + vars = vars.put(var, tt); } } else if (get(i) instanceof TermImpl) { + TermImpl t = (TermImpl) get(i); if (tv != null) { - TermImpl t = (TermImpl) get(i); if (tv instanceof TermImpl) { vars = t.getBinding((TermImpl) tv, vars); if (vars == null) { @@ -542,6 +565,8 @@ protected Map getBinding(TermImpl term, Map } else { return null; } + } else if (tt == null || !t.type().isAssignableFrom(tt)) { + return null; } } else if (tv != null && !tv.equals(get(i))) { return null; @@ -568,12 +593,20 @@ protected TermImpl setBinding(Map vars) { @SuppressWarnings({"unchecked", "rawtypes"}) public TermImpl getTerm(int i) { - return (TermImpl) super.get(i); + Object v = get(i); + return v instanceof TermImpl ? (TermImpl) v : null; + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + public Class getType(int i) { + Object v = get(i); + return v instanceof Class ? (Class) v : v instanceof TermImpl ? ((TermImpl) v).type() : null; } @SuppressWarnings("unchecked") public V getVal(int i) { - return (V) super.get(i); + Object v = get(i); + return v instanceof Class || v instanceof TermImpl ? null : (V) v; } public TermImpl set(int i, Object v) { @@ -676,7 +709,8 @@ protected List list() { protected int nrOfNulls() { int nr = 0; for (int i = 1; i < length(); i++) { - if (get(i) == null) { + Object v = get(i); + if (v == null || v instanceof Class) { nr++; } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 1f669b25..cb14e145 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -31,7 +31,10 @@ import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.util.SerializableBiFunction; import org.modelingvalue.collections.util.SerializableFunction; +import org.modelingvalue.collections.util.SerializableTriFunction; +import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.TermImpl; @@ -52,11 +55,11 @@ void run(Runnable test) { } static void isTrue(Term... goals) { - assertTrue(is(goals)); + assertTrue(Logic.is(goals)); } static void isFalse(Term... goals) { - assertFalse(is(goals)); + assertFalse(Logic.is(goals)); } static void hasResult(Set> bindings, Term... goals) { @@ -68,39 +71,87 @@ static Set> set(Map... bindings) { return Set.of(bindings); } + // Is + + static Functor is = functor(LogicTest::is); + + static Pred is(Int i, IntLit r) { + return term(is, i, r); + } + // Integer interface Int extends Term { } - static Functor i = functor((SerializableFunction) LogicTest::i); + interface IntLit extends Int { + } + + interface IntFun extends Int { + } + + static Functor i = functor((SerializableFunction) LogicTest::i); - static Int i(BigInteger x) { + static IntLit i(BigInteger x) { return term(i, x); } - static Int i(long x) { + static IntLit i(long x) { return i(BigInteger.valueOf(x)); } + static IntLit ilv(String name) { + return var(IntLit.class, name); + } + + static IntFun ifv(String name) { + return var(IntFun.class, name); + } + static Int iv(String name) { return var(Int.class, name); } - Int mOne = i(-1); - Int zero = i(0); - Int one = i(1); + IntLit mOne = i(-1); + IntLit zero = i(0); + IntLit one = i(1); + + IntLit seven = i(7); + IntLit three = i(3); + IntLit ten = i(10); + + IntLit O = ilv("O"); + IntLit P = ilv("P"); + IntLit Q = ilv("Q"); - Int seven = i(7); - Int three = i(3); - Int ten = i(10); + IntFun U = ifv("U"); + IntFun V = ifv("V"); + IntFun W = ifv("W"); - Int U = iv("U"); - Int V = iv("V"); - Int W = iv("W"); - Int X = iv("X"); - Int Y = iv("Y"); - Int Z = iv("Z"); + Int X = iv("X"); + Int Y = iv("Y"); + Int Z = iv("Z"); + + // Eq + + @SuppressWarnings({"unchecked", "rawtypes"}) + static Functor eq = functor(LogicTest::eq, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + if (at == null && bt == null) { + return t.incomplete(); + } else if (at == null) { + return Set.of(t.set(1, bt)); + } else if (bt == null) { + return Set.of(t.set(2, at)); + } else { + return at.equals(bt) ? Set.of(t) : Set.of(); + } + }); + + static Pred eq(Term a, Term b) { + return term(eq, a, b); + } // Plus @@ -108,10 +159,10 @@ interface Pred extends Term { } @SuppressWarnings({"unchecked", "rawtypes"}) - static Functor plus = functor(LogicTest::plus, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); + static Functor plusPred = functor((SerializableTriFunction) LogicTest::plus, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); BigInteger ai = at != null ? at.getVal(1) : null; BigInteger bi = bt != null ? bt.getVal(1) : null; BigInteger ci = ct != null ? ct.getVal(1) : null; @@ -128,8 +179,14 @@ interface Pred extends Term { } }); - static Pred plus(Int a, Int b, Int r) { - return term(plus, a, b, r); + static Pred plus(IntLit a, IntLit b, IntLit r) { + return term(plusPred, a, b, r); + } + + static Functor plusFunc = functor((SerializableBiFunction) LogicTest::plus); + + static IntFun plus(Int a, Int b) { + return term(plusFunc, a, b); } // FamilyTree @@ -279,9 +336,25 @@ public void test4() { isTrue(plus(zero, zero, zero)); isTrue(plus(one, zero, one)); isTrue(plus(seven, three, ten)); - hasResult(set(bind(X, ten)), plus(seven, three, X)); - hasResult(set(bind(X, three)), plus(seven, X, ten)); - hasResult(set(bind(X, seven)), plus(X, three, ten)); + hasResult(set(bind(P, ten)), plus(seven, three, P)); + hasResult(set(bind(P, three)), plus(seven, P, ten)); + hasResult(set(bind(P, seven)), plus(P, three, ten)); + }); + } + + @RepeatedTest(100) + public void test5() { + + run(() -> { + rule(is(P, Q), eq(P, Q)); + rule(is(plus(X, Y), O), is(X, P), is(Y, Q), plus(P, Q, O)); + + isTrue(is(plus(zero, zero), zero)); + isTrue(is(plus(one, zero), one)); + isTrue(is(plus(seven, three), ten)); + hasResult(set(bind(P, ten)), is(plus(seven, three), P)); + hasResult(set(bind(P, three)), is(plus(seven, P), ten)); + hasResult(set(bind(P, seven)), is(plus(P, three), ten)); }); } From 43c0f092f4a926fbd59e00cfb4f6b9a9db5879bc Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 2 Dec 2024 16:47:55 +0100 Subject: [PATCH 114/179] clarified example --- .../java/org/modelingvalue/dclare/Logic.java | 111 ++++++++++++ .../modelingvalue/dclare/test/LogicTest.java | 167 +++--------------- 2 files changed, 133 insertions(+), 145 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 8f9017a9..6823068b 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -23,6 +23,7 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.math.BigInteger; import java.util.Objects; import java.util.function.BiFunction; @@ -965,4 +966,114 @@ public static Map bind(Term... varVal) { return b; } + // Is + + private static Functor is = functor((SerializableBiFunction) Logic::is); + + public static Pred is(Int i, IntLit r) { + return term(is, i, r); + } + + // Integer + + public static interface Int extends Term { + } + + public static interface IntLit extends Int { + } + + public static interface IntFun extends Int { + } + + private static Functor i = functor((SerializableFunction) Logic::i); + + private static IntLit i(BigInteger x) { + return term(i, x); + } + + public static IntLit i(long x) { + return i(BigInteger.valueOf(x)); + } + + public static IntLit ilv(String name) { + return var(IntLit.class, name); + } + + public static IntFun ifv(String name) { + return var(IntFun.class, name); + } + + public static Int iv(String name) { + return var(Int.class, name); + } + + // Eq + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor eq = functor(Logic::eq, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + if (at == null && bt == null) { + return t.incomplete(); + } else if (at == null) { + return Set.of(t.set(1, bt)); + } else if (bt == null) { + return Set.of(t.set(2, at)); + } else { + return at.equals(bt) ? Set.of(t) : Set.of(); + } + }); + + public static Pred eq(Term a, Term b) { + return term(eq, a, b); + } + + // Plus + + public static interface Pred extends Term { + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor plusPred = functor((SerializableTriFunction) Logic::plus, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + BigInteger ci = ct != null ? ct.getVal(1) : null; + if (ai != null && bi != null && ci != null) { + return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); + } else if (ai != null && bi != null && ci == null) { + return Set.of(t.set(3, at.set(1, ai.add(bi)))); + } else if (ai != null && bi == null && ci != null) { + return Set.of(t.set(2, at.set(1, ci.subtract(ai)))); + } else if (ai == null && bi != null && ci != null) { + return Set.of(t.set(1, bt.set(1, ci.subtract(bi)))); + } else { + return t.incomplete(); + } + }); + + public static Pred plus(IntLit a, IntLit b, IntLit r) { + return term(plusPred, a, b, r); + } + + private static Functor plusFunc = functor((SerializableBiFunction) Logic::plus); + + public static IntFun plus(Int a, Int b) { + return term(plusFunc, a, b); + } + + public static void isRules() { + IntLit PL = ilv("PL"); + IntLit QL = ilv("QL"); + IntLit RL = ilv("RL"); + + Int X = iv("X"); + Int Y = iv("Y"); + + rule(is(PL, RL), eq(PL, RL)); + rule(is(plus(X, Y), RL), is(X, PL), is(Y, QL), plus(PL, QL, RL)); + } + } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index cb14e145..d4eadd56 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -24,20 +24,16 @@ import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; -import java.math.BigInteger; import java.util.concurrent.ThreadLocalRandom; import org.junit.jupiter.api.RepeatedTest; import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.util.SerializableBiFunction; -import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Functor; +import org.modelingvalue.dclare.Logic.IntLit; import org.modelingvalue.dclare.Logic.Term; -import org.modelingvalue.dclare.Logic.TermImpl; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -71,124 +67,6 @@ static Set> set(Map... bindings) { return Set.of(bindings); } - // Is - - static Functor is = functor(LogicTest::is); - - static Pred is(Int i, IntLit r) { - return term(is, i, r); - } - - // Integer - - interface Int extends Term { - } - - interface IntLit extends Int { - } - - interface IntFun extends Int { - } - - static Functor i = functor((SerializableFunction) LogicTest::i); - - static IntLit i(BigInteger x) { - return term(i, x); - } - - static IntLit i(long x) { - return i(BigInteger.valueOf(x)); - } - - static IntLit ilv(String name) { - return var(IntLit.class, name); - } - - static IntFun ifv(String name) { - return var(IntFun.class, name); - } - - static Int iv(String name) { - return var(Int.class, name); - } - - IntLit mOne = i(-1); - IntLit zero = i(0); - IntLit one = i(1); - - IntLit seven = i(7); - IntLit three = i(3); - IntLit ten = i(10); - - IntLit O = ilv("O"); - IntLit P = ilv("P"); - IntLit Q = ilv("Q"); - - IntFun U = ifv("U"); - IntFun V = ifv("V"); - IntFun W = ifv("W"); - - Int X = iv("X"); - Int Y = iv("Y"); - Int Z = iv("Z"); - - // Eq - - @SuppressWarnings({"unchecked", "rawtypes"}) - static Functor eq = functor(LogicTest::eq, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - if (at == null && bt == null) { - return t.incomplete(); - } else if (at == null) { - return Set.of(t.set(1, bt)); - } else if (bt == null) { - return Set.of(t.set(2, at)); - } else { - return at.equals(bt) ? Set.of(t) : Set.of(); - } - }); - - static Pred eq(Term a, Term b) { - return term(eq, a, b); - } - - // Plus - - interface Pred extends Term { - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - static Functor plusPred = functor((SerializableTriFunction) LogicTest::plus, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - BigInteger ci = ct != null ? ct.getVal(1) : null; - if (ai != null && bi != null && ci != null) { - return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); - } else if (ai != null && bi != null && ci == null) { - return Set.of(t.set(3, at.set(1, ai.add(bi)))); - } else if (ai != null && bi == null && ci != null) { - return Set.of(t.set(2, at.set(1, ci.subtract(ai)))); - } else if (ai == null && bi != null && ci != null) { - return Set.of(t.set(1, bt.set(1, ci.subtract(bi)))); - } else { - return t.incomplete(); - } - }); - - static Pred plus(IntLit a, IntLit b, IntLit r) { - return term(plusPred, a, b, r); - } - - static Functor plusFunc = functor((SerializableBiFunction) LogicTest::plus); - - static IntFun plus(Int a, Int b) { - return term(plusFunc, a, b); - } - // FamilyTree interface Person extends Term { @@ -232,6 +110,8 @@ static AncestorDescendent ancestorDescendentVar(String name) { // Variables + IntLit P = ilv("P"); + Person A = personVar("A"); // Ancestor Person D = personVar("D"); // Descendent Person R = personVar("R"); // Relative @@ -249,7 +129,7 @@ static AncestorDescendent ancestorDescendentVar(String name) { Person Marijn = person("Marijn"); @RepeatedTest(100) - public void test0() { + public void famTest0() { run(() -> { rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); @@ -280,7 +160,7 @@ public void test0() { } @RepeatedTest(100) - public void test1() { + public void famTest1() { run(() -> { rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); @@ -300,7 +180,7 @@ public void test1() { } @RepeatedTest(100) - public void test2() { + public void famTest2() { run(() -> { rule(ancestorDescendent(A, D), parentChild(A, D)); rule(ancestorDescendent(A, D), parentChild(A, B), parentChild(B, D)); @@ -319,7 +199,7 @@ public void test2() { } @RepeatedTest(100) - public void test3() { + public void famTest3() { run(() -> { rule(parentChild(B, C), parentChild(B, C)); @@ -331,30 +211,27 @@ public void test3() { } @RepeatedTest(100) - public void test4() { + public void intTest() { run(() -> { - isTrue(plus(zero, zero, zero)); - isTrue(plus(one, zero, one)); - isTrue(plus(seven, three, ten)); - hasResult(set(bind(P, ten)), plus(seven, three, P)); - hasResult(set(bind(P, three)), plus(seven, P, ten)); - hasResult(set(bind(P, seven)), plus(P, three, ten)); + isTrue(plus(i(11), i(22), i(33))); + + hasResult(set(bind(P, i(10))), plus(i(7), i(3), P)); + hasResult(set(bind(P, i(3))), plus(i(7), P, i(10))); + hasResult(set(bind(P, i(7))), plus(P, i(3), i(10))); }); } @RepeatedTest(100) - public void test5() { - + public void isTest() { run(() -> { - rule(is(P, Q), eq(P, Q)); - rule(is(plus(X, Y), O), is(X, P), is(Y, Q), plus(P, Q, O)); - - isTrue(is(plus(zero, zero), zero)); - isTrue(is(plus(one, zero), one)); - isTrue(is(plus(seven, three), ten)); - hasResult(set(bind(P, ten)), is(plus(seven, three), P)); - hasResult(set(bind(P, three)), is(plus(seven, P), ten)); - hasResult(set(bind(P, seven)), is(plus(P, three), ten)); + isRules(); + isTrue(is(plus(i(11), i(22)), i(33))); + isTrue(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), i(110))); + + hasResult(set(bind(P, i(110))), is(plus(i(11), plus(plus(i(22), i(33)), i(44))), P)); + hasResult(set(bind(P, i(10))), is(plus(i(7), i(3)), P)); + hasResult(set(bind(P, i(3))), is(plus(i(7), P), i(10))); + hasResult(set(bind(P, i(7))), is(plus(P, i(3)), i(10))); }); } From 9a8086500c77f9e63f510ce470750059bfcd2da8 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 3 Dec 2024 08:07:19 +0100 Subject: [PATCH 115/179] extra test --- src/test/java/org/modelingvalue/dclare/test/LogicTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index d4eadd56..df1350bb 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -229,6 +229,7 @@ public void isTest() { isTrue(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), i(110))); hasResult(set(bind(P, i(110))), is(plus(i(11), plus(plus(i(22), i(33)), i(44))), P)); + hasResult(set(bind(P, i(33))), is(plus(i(11), plus(plus(i(22), P), i(44))), i(110))); hasResult(set(bind(P, i(10))), is(plus(i(7), i(3)), P)); hasResult(set(bind(P, i(3))), is(plus(i(7), P), i(10))); hasResult(set(bind(P, i(7))), is(plus(P, i(3)), i(10))); From f96a6513e5bcc5b117ddbb73db517846abe9fb62 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 3 Dec 2024 16:35:54 +0100 Subject: [PATCH 116/179] mult power --- .../java/org/modelingvalue/dclare/Logic.java | 88 ++++++++++++++++++- .../modelingvalue/dclare/test/LogicTest.java | 11 ++- 2 files changed, 96 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 6823068b..d5fb93a2 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -1028,7 +1028,7 @@ public static Pred eq(Term a, Term b) { return term(eq, a, b); } - // Plus + // Operators public static interface Pred extends Term { } @@ -1058,12 +1058,93 @@ public static Pred plus(IntLit a, IntLit b, IntLit r) { return term(plusPred, a, b, r); } + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor multiplyPred = functor((SerializableTriFunction) Logic::multiply, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + BigInteger ci = ct != null ? ct.getVal(1) : null; + if (ai != null && bi != null && ci != null) { + return ai.multiply(bi).equals(ci) ? Set.of(t) : Set.of(); + } else if (ai != null && bi != null && ci == null) { + return Set.of(t.set(3, at.set(1, ai.multiply(bi)))); + } else if (ai != null && bi == null && ci != null) { + return Set.of(t.set(2, at.set(1, ci.divide(ai)))); + } else if (ai == null && bi != null && ci != null) { + return Set.of(t.set(1, bt.set(1, ci.divide(bi)))); + } else { + return t.incomplete(); + } + }); + + public static Pred multiply(IntLit a, IntLit b, IntLit r) { + return term(multiplyPred, a, b, r); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor powerPred = functor((SerializableBiFunction) Logic::power, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + if (ai != null && bi != null) { + return ai.multiply(ai).equals(bi) ? Set.of(t) : Set.of(); + } else if (ai != null && bi == null) { + return Set.of(t.set(2, at.set(1, ai.multiply(ai)))); + } else if (ai == null && bi != null) { + BigInteger sqrt = bi.sqrt(); + return Set.of(t.set(1, bt.set(1, sqrt)), t.set(1, bt.set(1, sqrt.negate()))); + } else { + return t.incomplete(); + } + }); + + public static Pred power(IntLit a, IntLit r) { + return term(powerPred, a, r); + } + + // Functions + private static Functor plusFunc = functor((SerializableBiFunction) Logic::plus); public static IntFun plus(Int a, Int b) { return term(plusFunc, a, b); } + private static Functor minusFunc = functor((SerializableBiFunction) Logic::minus); + + public static IntFun minus(Int a, Int b) { + return term(minusFunc, a, b); + } + + private static Functor multiplyFunc = functor((SerializableBiFunction) Logic::multiply); + + public static IntFun multiply(Int a, Int b) { + return term(multiplyFunc, a, b); + } + + private static Functor divideFunc = functor((SerializableBiFunction) Logic::divide); + + public static IntFun divide(Int a, Int b) { + return term(divideFunc, a, b); + } + + private static Functor powerFunc = functor((SerializableFunction) Logic::power); + + public static IntFun power(Int a) { + return term(powerFunc, a); + } + + private static Functor sqrtFunc = functor((SerializableFunction) Logic::sqrt); + + public static IntFun sqrt(Int a) { + return term(sqrtFunc, a); + } + + // Is Rules + public static void isRules() { IntLit PL = ilv("PL"); IntLit QL = ilv("QL"); @@ -1074,6 +1155,11 @@ public static void isRules() { rule(is(PL, RL), eq(PL, RL)); rule(is(plus(X, Y), RL), is(X, PL), is(Y, QL), plus(PL, QL, RL)); + rule(is(minus(X, Y), RL), is(X, PL), is(Y, QL), plus(RL, QL, PL)); + rule(is(multiply(X, Y), RL), is(X, PL), is(Y, QL), multiply(PL, QL, RL)); + rule(is(divide(X, Y), RL), is(X, PL), is(Y, QL), multiply(RL, QL, PL)); + rule(is(power(X), RL), is(X, PL), power(PL, RL)); + rule(is(sqrt(X), RL), is(X, PL), power(RL, PL)); } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index df1350bb..caab1538 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -213,8 +213,6 @@ public void famTest3() { @RepeatedTest(100) public void intTest() { run(() -> { - isTrue(plus(i(11), i(22), i(33))); - hasResult(set(bind(P, i(10))), plus(i(7), i(3), P)); hasResult(set(bind(P, i(3))), plus(i(7), P, i(10))); hasResult(set(bind(P, i(7))), plus(P, i(3), i(10))); @@ -225,14 +223,23 @@ public void intTest() { public void isTest() { run(() -> { isRules(); + isTrue(is(plus(i(11), i(22)), i(33))); + isTrue(is(minus(i(33), i(22)), i(11))); isTrue(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), i(110))); + isTrue(is(plus(i(11), divide(multiply(i(44), i(33)), i(22))), i(77))); + + isTrue(is(sqrt(i(49)), i(7))); + isTrue(is(sqrt(i(49)), i(-7))); + hasResult(set(bind(P, i(110))), is(plus(i(11), plus(plus(i(22), i(33)), i(44))), P)); hasResult(set(bind(P, i(33))), is(plus(i(11), plus(plus(i(22), P), i(44))), i(110))); hasResult(set(bind(P, i(10))), is(plus(i(7), i(3)), P)); hasResult(set(bind(P, i(3))), is(plus(i(7), P), i(10))); hasResult(set(bind(P, i(7))), is(plus(P, i(3)), i(10))); + + hasResult(set(bind(P, i(7)), bind(P, i(-7))), is(sqrt(i(49)), P)); }); } From 0d0e9d0fad68e3acc262ae4df27942d2bef20190 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 3 Dec 2024 16:44:54 +0100 Subject: [PATCH 117/179] separate Arithmetic --- .../org/modelingvalue/dclare/Arithmetic.java | 187 ++++++++++++++++ .../java/org/modelingvalue/dclare/Logic.java | 205 ++---------------- .../modelingvalue/dclare/test/LogicTest.java | 9 +- 3 files changed, 208 insertions(+), 193 deletions(-) create mode 100644 src/main/java/org/modelingvalue/dclare/Arithmetic.java diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java new file mode 100644 index 00000000..c7e57c19 --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -0,0 +1,187 @@ +package org.modelingvalue.dclare; + +import java.math.BigInteger; + +import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.util.SerializableBiFunction; +import org.modelingvalue.collections.util.SerializableFunction; +import org.modelingvalue.collections.util.SerializableTriFunction; + +public class Arithmetic extends Logic { + + // Is + + private static Functor is = functor((SerializableBiFunction) Arithmetic::is); + + public static Pred is(Int i, IntLit r) { + return term(is, i, r); + } + + // Integer + + public static interface Int extends Term { + } + + public static interface IntLit extends Int { + } + + public static interface IntFun extends Int { + } + + private static Functor i = functor((SerializableFunction) Arithmetic::i); + + private static IntLit i(BigInteger x) { + return term(i, x); + } + + public static IntLit i(long x) { + return i(BigInteger.valueOf(x)); + } + + public static IntLit ilv(String name) { + return var(IntLit.class, name); + } + + public static IntFun ifv(String name) { + return var(IntFun.class, name); + } + + public static Int iv(String name) { + return var(Int.class, name); + } + + // Operators + + public static interface Pred extends Term { + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor plusPred = functor((SerializableTriFunction) Arithmetic::plus, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + BigInteger ci = ct != null ? ct.getVal(1) : null; + if (ai != null && bi != null && ci != null) { + return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); + } else if (ai != null && bi != null && ci == null) { + return Set.of(t.set(3, at.set(1, ai.add(bi)))); + } else if (ai != null && bi == null && ci != null) { + return Set.of(t.set(2, at.set(1, ci.subtract(ai)))); + } else if (ai == null && bi != null && ci != null) { + return Set.of(t.set(1, bt.set(1, ci.subtract(bi)))); + } else { + return t.incomplete(); + } + }); + + public static Pred plus(IntLit a, IntLit b, IntLit r) { + return term(plusPred, a, b, r); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor multiplyPred = functor((SerializableTriFunction) Arithmetic::multiply, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + BigInteger ci = ct != null ? ct.getVal(1) : null; + if (ai != null && bi != null && ci != null) { + return ai.multiply(bi).equals(ci) ? Set.of(t) : Set.of(); + } else if (ai != null && bi != null && ci == null) { + return Set.of(t.set(3, at.set(1, ai.multiply(bi)))); + } else if (ai != null && bi == null && ci != null) { + return Set.of(t.set(2, at.set(1, ci.divide(ai)))); + } else if (ai == null && bi != null && ci != null) { + return Set.of(t.set(1, bt.set(1, ci.divide(bi)))); + } else { + return t.incomplete(); + } + }); + + public static Pred multiply(IntLit a, IntLit b, IntLit r) { + return term(multiplyPred, a, b, r); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor powerPred = functor((SerializableBiFunction) Arithmetic::power, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + if (ai != null && bi != null) { + return ai.multiply(ai).equals(bi) ? Set.of(t) : Set.of(); + } else if (ai != null && bi == null) { + return Set.of(t.set(2, at.set(1, ai.multiply(ai)))); + } else if (ai == null && bi != null) { + BigInteger sqrt = bi.sqrt(); + return Set.of(t.set(1, bt.set(1, sqrt)), t.set(1, bt.set(1, sqrt.negate()))); + } else { + return t.incomplete(); + } + }); + + public static Pred power(IntLit a, IntLit r) { + return term(powerPred, a, r); + } + + // Functions + + private static Functor plusFunc = functor((SerializableBiFunction) Arithmetic::plus); + + public static IntFun plus(Int a, Int b) { + return term(plusFunc, a, b); + } + + private static Functor minusFunc = functor((SerializableBiFunction) Arithmetic::minus); + + public static IntFun minus(Int a, Int b) { + return term(minusFunc, a, b); + } + + private static Functor multiplyFunc = functor((SerializableBiFunction) Arithmetic::multiply); + + public static IntFun multiply(Int a, Int b) { + return term(multiplyFunc, a, b); + } + + private static Functor divideFunc = functor((SerializableBiFunction) Arithmetic::divide); + + public static IntFun divide(Int a, Int b) { + return term(divideFunc, a, b); + } + + private static Functor powerFunc = functor((SerializableFunction) Arithmetic::power); + + public static IntFun power(Int a) { + return term(powerFunc, a); + } + + private static Functor sqrtFunc = functor((SerializableFunction) Arithmetic::sqrt); + + public static IntFun sqrt(Int a) { + return term(sqrtFunc, a); + } + + // Is Rules + + public static void rules() { + IntLit PL = ilv("PL"); + IntLit QL = ilv("QL"); + IntLit RL = ilv("RL"); + + Int X = iv("X"); + Int Y = iv("Y"); + + rule(is(PL, RL), eq(PL, RL)); + rule(is(plus(X, Y), RL), is(X, PL), is(Y, QL), plus(PL, QL, RL)); + rule(is(minus(X, Y), RL), is(X, PL), is(Y, QL), plus(RL, QL, PL)); + rule(is(multiply(X, Y), RL), is(X, PL), is(Y, QL), multiply(PL, QL, RL)); + rule(is(divide(X, Y), RL), is(X, PL), is(Y, QL), multiply(RL, QL, PL)); + rule(is(power(X), RL), is(X, PL), power(PL, RL)); + rule(is(sqrt(X), RL), is(X, PL), power(RL, PL)); + } + +} diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index d5fb93a2..62249223 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -23,7 +23,6 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import java.math.BigInteger; import java.util.Objects; import java.util.function.BiFunction; @@ -43,10 +42,9 @@ import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; +import org.modelingvalue.dclare.Arithmetic.Pred; -public final class Logic { - private Logic() { - } +public class Logic { private static final boolean USE_EXTEND = Boolean.getBoolean("USE_EXTEND"); @@ -161,7 +159,7 @@ private static final Object noProxy(Object object) { } @SuppressWarnings("rawtypes") - private static final Object unproxy(Object object) { + protected static final Object unproxy(Object object) { if (object instanceof Term) { return Proxy.getInvocationHandler(object); } else { @@ -949,68 +947,10 @@ public static Incomplete incomplete(L der) { return term(INCOMPLETE_FUNCTOR_PROXY, der); } - // Facts, Is - - public static void fact(Term term) { - ((TermImpl) unproxy(term)).makeFact(); - } - - // Variable bindings - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Map bind(Term... varVal) { - Map b = Map.of(); - for (int i = 0; i < varVal.length; i += 2) { - b = b.add(Entry.of((Variable) varVal[i], varVal[i + 1])); - } - return b; - } - - // Is - - private static Functor is = functor((SerializableBiFunction) Logic::is); - - public static Pred is(Int i, IntLit r) { - return term(is, i, r); - } - - // Integer - - public static interface Int extends Term { - } - - public static interface IntLit extends Int { - } - - public static interface IntFun extends Int { - } - - private static Functor i = functor((SerializableFunction) Logic::i); - - private static IntLit i(BigInteger x) { - return term(i, x); - } - - public static IntLit i(long x) { - return i(BigInteger.valueOf(x)); - } - - public static IntLit ilv(String name) { - return var(IntLit.class, name); - } - - public static IntFun ifv(String name) { - return var(IntFun.class, name); - } - - public static Int iv(String name) { - return var(Int.class, name); - } - - // Eq + // Equals @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor eq = functor(Logic::eq, t -> { + private static Functor eq = functor(Arithmetic::eq, t -> { TermImpl at = t.getTerm(1); TermImpl bt = t.getTerm(2); if (at == null && bt == null) { @@ -1028,138 +968,21 @@ public static Pred eq(Term a, Term b) { return term(eq, a, b); } - // Operators - - public static interface Pred extends Term { - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor plusPred = functor((SerializableTriFunction) Logic::plus, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - BigInteger ci = ct != null ? ct.getVal(1) : null; - if (ai != null && bi != null && ci != null) { - return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); - } else if (ai != null && bi != null && ci == null) { - return Set.of(t.set(3, at.set(1, ai.add(bi)))); - } else if (ai != null && bi == null && ci != null) { - return Set.of(t.set(2, at.set(1, ci.subtract(ai)))); - } else if (ai == null && bi != null && ci != null) { - return Set.of(t.set(1, bt.set(1, ci.subtract(bi)))); - } else { - return t.incomplete(); - } - }); + // Facts, Is - public static Pred plus(IntLit a, IntLit b, IntLit r) { - return term(plusPred, a, b, r); + public static void fact(Term term) { + ((TermImpl) unproxy(term)).makeFact(); } - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor multiplyPred = functor((SerializableTriFunction) Logic::multiply, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - BigInteger ci = ct != null ? ct.getVal(1) : null; - if (ai != null && bi != null && ci != null) { - return ai.multiply(bi).equals(ci) ? Set.of(t) : Set.of(); - } else if (ai != null && bi != null && ci == null) { - return Set.of(t.set(3, at.set(1, ai.multiply(bi)))); - } else if (ai != null && bi == null && ci != null) { - return Set.of(t.set(2, at.set(1, ci.divide(ai)))); - } else if (ai == null && bi != null && ci != null) { - return Set.of(t.set(1, bt.set(1, ci.divide(bi)))); - } else { - return t.incomplete(); - } - }); - - public static Pred multiply(IntLit a, IntLit b, IntLit r) { - return term(multiplyPred, a, b, r); - } + // Variable bindings @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor powerPred = functor((SerializableBiFunction) Logic::power, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - if (ai != null && bi != null) { - return ai.multiply(ai).equals(bi) ? Set.of(t) : Set.of(); - } else if (ai != null && bi == null) { - return Set.of(t.set(2, at.set(1, ai.multiply(ai)))); - } else if (ai == null && bi != null) { - BigInteger sqrt = bi.sqrt(); - return Set.of(t.set(1, bt.set(1, sqrt)), t.set(1, bt.set(1, sqrt.negate()))); - } else { - return t.incomplete(); + public static Map bind(Term... varVal) { + Map b = Map.of(); + for (int i = 0; i < varVal.length; i += 2) { + b = b.add(Entry.of((Variable) varVal[i], varVal[i + 1])); } - }); - - public static Pred power(IntLit a, IntLit r) { - return term(powerPred, a, r); - } - - // Functions - - private static Functor plusFunc = functor((SerializableBiFunction) Logic::plus); - - public static IntFun plus(Int a, Int b) { - return term(plusFunc, a, b); - } - - private static Functor minusFunc = functor((SerializableBiFunction) Logic::minus); - - public static IntFun minus(Int a, Int b) { - return term(minusFunc, a, b); - } - - private static Functor multiplyFunc = functor((SerializableBiFunction) Logic::multiply); - - public static IntFun multiply(Int a, Int b) { - return term(multiplyFunc, a, b); - } - - private static Functor divideFunc = functor((SerializableBiFunction) Logic::divide); - - public static IntFun divide(Int a, Int b) { - return term(divideFunc, a, b); - } - - private static Functor powerFunc = functor((SerializableFunction) Logic::power); - - public static IntFun power(Int a) { - return term(powerFunc, a); - } - - private static Functor sqrtFunc = functor((SerializableFunction) Logic::sqrt); - - public static IntFun sqrt(Int a) { - return term(sqrtFunc, a); - } - - // Is Rules - - public static void isRules() { - IntLit PL = ilv("PL"); - IntLit QL = ilv("QL"); - IntLit RL = ilv("RL"); - - Int X = iv("X"); - Int Y = iv("Y"); - - rule(is(PL, RL), eq(PL, RL)); - rule(is(plus(X, Y), RL), is(X, PL), is(Y, QL), plus(PL, QL, RL)); - rule(is(minus(X, Y), RL), is(X, PL), is(Y, QL), plus(RL, QL, PL)); - rule(is(multiply(X, Y), RL), is(X, PL), is(Y, QL), multiply(PL, QL, RL)); - rule(is(divide(X, Y), RL), is(X, PL), is(Y, QL), multiply(RL, QL, PL)); - rule(is(power(X), RL), is(X, PL), power(PL, RL)); - rule(is(sqrt(X), RL), is(X, PL), power(RL, PL)); + return b; } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index caab1538..d07d28f6 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -21,6 +21,8 @@ package org.modelingvalue.dclare.test; import static org.junit.jupiter.api.Assertions.*; +import static org.modelingvalue.dclare.Arithmetic.*; +import static org.modelingvalue.dclare.Arithmetic.is; import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; @@ -30,9 +32,10 @@ import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; +import org.modelingvalue.dclare.Arithmetic; +import org.modelingvalue.dclare.Arithmetic.IntLit; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Functor; -import org.modelingvalue.dclare.Logic.IntLit; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; @@ -213,6 +216,8 @@ public void famTest3() { @RepeatedTest(100) public void intTest() { run(() -> { + Arithmetic.rules(); + hasResult(set(bind(P, i(10))), plus(i(7), i(3), P)); hasResult(set(bind(P, i(3))), plus(i(7), P, i(10))); hasResult(set(bind(P, i(7))), plus(P, i(3), i(10))); @@ -222,7 +227,7 @@ public void intTest() { @RepeatedTest(100) public void isTest() { run(() -> { - isRules(); + Arithmetic.rules(); isTrue(is(plus(i(11), i(22)), i(33))); isTrue(is(minus(i(33), i(22)), i(11))); From 763f0f92221d85437ba9a47e93c10ee576b8798b Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 4 Dec 2024 09:27:56 +0100 Subject: [PATCH 118/179] incomplete in lambda's priority --- .../java/org/modelingvalue/dclare/Logic.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 62249223..79b93ee4 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -681,13 +681,24 @@ protected int termPrio(List der) { if (facts != null) { return Integer.MIN_VALUE + facts.size(); } else { - List rules = RULES.get(functor()); - if (rules != null) { - if (der.lastIndexOf(this) >= 0) { - return Integer.MAX_VALUE; + SerializableFunction, Collection> lambda = functor().lambda(); + if (lambda != null) { + Collection result = lambda.apply(this); + if (result instanceof Set) { + Set set = (Set) result; + return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); } else { return non; } + } else { + List rules = RULES.get(functor()); + if (rules != null) { + if (der.lastIndexOf(this) >= 0) { + return Integer.MAX_VALUE; + } else { + return non; + } + } } } return Integer.MIN_VALUE; @@ -715,6 +726,10 @@ protected int nrOfNulls() { } return nr; } + + protected boolean isIncomplete() { + return functor() == INCOMPLETE_FUNCTOR; + } }; // Rules From 5ea58b65b1bf9c5d73e95f3ed77d5d80c34e4c57 Mon Sep 17 00:00:00 2001 From: WimBast Date: Wed, 4 Dec 2024 16:32:53 +0100 Subject: [PATCH 119/179] new tests and fixes --- .../org/modelingvalue/dclare/Arithmetic.java | 73 ++++++- .../java/org/modelingvalue/dclare/Logic.java | 87 +++++--- .../modelingvalue/dclare/test/LogicTest.java | 201 ++++++++++-------- 3 files changed, 243 insertions(+), 118 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java index c7e57c19..9f5526cf 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -55,6 +55,35 @@ public static Int iv(String name) { public static interface Pred extends Term { } + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Functor compare = functor((SerializableTriFunction) Arithmetic::compare, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); + BigInteger ai = at != null ? at.getVal(1) : null; + BigInteger bi = bt != null ? bt.getVal(1) : null; + BigInteger ci = ct != null ? ct.getVal(1) : null; + if (ai != null && bi != null) { + BigInteger r = BigInteger.valueOf(ai.compareTo(bi)); + if (ci != null) { + return ci.equals(r) ? Set.of(t) : Set.of(); + } else { + return Set.of(t.set(3, at.set(1, r))); + } + } else if (BigInteger.ZERO.equals(ci)) { + if (ai != null) { + return Set.of(t.set(2, at)); + } else if (bi != null) { + return Set.of(t.set(1, bt)); + } + } + return t.incomplete(); + }); + + public static Pred compare(IntLit a, IntLit b, IntLit c) { + return term(compare, a, b, c); + } + @SuppressWarnings({"unchecked", "rawtypes"}) private static Functor plusPred = functor((SerializableTriFunction) Arithmetic::plus, t -> { TermImpl at = t.getTerm(1); @@ -129,6 +158,30 @@ public static Pred power(IntLit a, IntLit r) { // Functions + private static Functor gt = functor(Arithmetic::gt); + + public static Pred gt(Int a, Int b) { + return term(gt, a, b); + } + + private static Functor lt = functor(Arithmetic::lt); + + public static Pred lt(Int a, Int b) { + return term(lt, a, b); + } + + private static Functor ge = functor(Arithmetic::ge); + + public static Pred ge(Int a, Int b) { + return term(ge, a, b); + } + + private static Functor le = functor(Arithmetic::le); + + public static Pred le(Int a, Int b) { + return term(le, a, b); + } + private static Functor plusFunc = functor((SerializableBiFunction) Arithmetic::plus); public static IntFun plus(Int a, Int b) { @@ -175,13 +228,19 @@ public static void rules() { Int X = iv("X"); Int Y = iv("Y"); - rule(is(PL, RL), eq(PL, RL)); - rule(is(plus(X, Y), RL), is(X, PL), is(Y, QL), plus(PL, QL, RL)); - rule(is(minus(X, Y), RL), is(X, PL), is(Y, QL), plus(RL, QL, PL)); - rule(is(multiply(X, Y), RL), is(X, PL), is(Y, QL), multiply(PL, QL, RL)); - rule(is(divide(X, Y), RL), is(X, PL), is(Y, QL), multiply(RL, QL, PL)); - rule(is(power(X), RL), is(X, PL), power(PL, RL)); - rule(is(sqrt(X), RL), is(X, PL), power(RL, PL)); + rule(is(PL, RL), goal(eq(PL, RL))); + rule(is(plus(X, Y), RL), goal(is(X, PL), is(Y, QL), plus(PL, QL, RL))); + rule(is(minus(X, Y), RL), goal(is(X, PL), is(Y, QL), plus(RL, QL, PL))); + rule(is(multiply(X, Y), RL), goal(is(X, PL), is(Y, QL), multiply(PL, QL, RL))); + rule(is(divide(X, Y), RL), goal(is(X, PL), is(Y, QL), multiply(RL, QL, PL))); + rule(is(power(X), RL), goal(is(X, PL), power(PL, RL))); + rule(is(sqrt(X), RL), goal(is(X, PL), power(RL, PL))); + rule(gt(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(1)))); + rule(lt(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(-1)))); + rule(ge(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(1)))); + rule(ge(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(0)))); + rule(le(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(-1)))); + rule(le(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(0)))); } } diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 79b93ee4..5d5ea16a 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -169,8 +169,8 @@ protected static final Object unproxy(Object object) { } @SuppressWarnings("unchecked") - private static final ClauseImpl unproxy(T object) { - return (ClauseImpl) Proxy.getInvocationHandler(object); + private static final > R unproxy(T object) { + return (R) Proxy.getInvocationHandler(object); } @SuppressWarnings("rawtypes") @@ -440,7 +440,7 @@ private TermImpl(Object[] args) { @Override @SuppressWarnings("unchecked") protected F proxy() { - return (F) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{type(), Term.class}, this); + return (F) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{type()}, this); } @Override @@ -693,11 +693,14 @@ protected int termPrio(List der) { } else { List rules = RULES.get(functor()); if (rules != null) { - if (der.lastIndexOf(this) >= 0) { - return Integer.MAX_VALUE; - } else { - return non; + for (int i = der.size() - 1; i >= 0; i--) { + TermImpl other = der.get(i); + if (equals(other) || moreNullsThen(other) >= 0) { + return Integer.MAX_VALUE; + } } + return non; + } } } @@ -705,6 +708,33 @@ protected int termPrio(List der) { } } + @SuppressWarnings("rawtypes") + private int moreNullsThen(TermImpl other) { + if (!get(0).equals(other.get(0))) { + return Integer.MIN_VALUE; + } + int[] nr = new int[2]; + for (int i = 1; i < length(); i++) { + if (!Objects.equals(get(i), other.get(i))) { + if (get(i) == null || get(i) instanceof Class) { + nr[0]++; + } else if (other.get(i) == null || other.get(i) instanceof Class) { + nr[1]++; + } else if (get(i) instanceof TermImpl && other.get(i) instanceof TermImpl) { + int r = ((TermImpl) get(i)).moreNullsThen((TermImpl) other.get(i)); + if (r == Integer.MIN_VALUE) { + return Integer.MIN_VALUE; + } else { + nr[0] += r; + } + } else { + return Integer.MIN_VALUE; + } + } + } + return nr[0] - nr[1]; + } + @SuppressWarnings("rawtypes") protected List list() { List l = List.of(); @@ -740,15 +770,10 @@ public static interface Rule extends Term { private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule, null); private static final Functor RULE_FUNCTOR_PROXY = RULE_FUNCTOR.proxy(); - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Rule rule(Term term, Term... goals) { - return rule(term, goal(goals)); - } - @SuppressWarnings({"unchecked", "rawtypes"}) public static Rule rule(Term term, Goal goal) { RuleImpl ruleImpl = new RuleImpl(term, goal); - TermImpl termImpl = (TermImpl) unproxy(term); + TermImpl termImpl = Logic. unproxy(term); RULES.force(termImpl.functor(), ADD_RULE, ruleImpl); return ruleImpl.proxy(); } @@ -820,13 +845,25 @@ public static interface Goal extends Term { private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal, null); private static final Functor GOAL_FUNCTOR_PROXY = GOAL_FUNCTOR.proxy(); - public static boolean is(Term... goals) { - return new GoalImpl(list(goals)).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); + private static GoalImpl getImpl(Goal goal) { + return Logic. unproxy(goal); + } + + public static boolean isTrue(Goal goal) { + return getImpl(goal).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); + } + + public static boolean isFalse(Goal goal) { + return getImpl(goal).eval().isEmpty(); + } + + public static boolean isIncomplete(Goal goal) { + return getImpl(goal).eval().anyMatch(e -> e.containsKey(INCOMPLETE_VAR)); } @SuppressWarnings("rawtypes") - public static Set> eval(Term... goals) { - return new GoalImpl(list(goals)).eval().map(m -> m.asMap(e -> Entry.of((Variable) e.getKey().proxy(), proxy(e.getValue())))).asSet(); + public static Set> getBindings(Goal goal) { + return getImpl(goal).eval().map(m -> m.asMap(e -> Entry.of((Variable) e.getKey().proxy(), proxy(e.getValue())))).asSet(); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -943,10 +980,6 @@ public static Incomplete incompleteVar() { return INCOMPLETE_VAR_PROXY; } - public static Map incomplete(Term... der) { - return Map.of(Entry.of((Variable) incompleteVar(), incomplete(list(der)).proxy())); - } - @SuppressWarnings({"unchecked", "rawtypes"}) private static TermImpl incomplete(List der) { return incomplete(list(der)); @@ -985,14 +1018,18 @@ public static Pred eq(Term a, Term b) { // Facts, Is + @SuppressWarnings({"unchecked", "rawtypes"}) public static void fact(Term term) { - ((TermImpl) unproxy(term)).makeFact(); + Logic. unproxy(term).makeFact(); } - // Variable bindings + // Bindings - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Map bind(Term... varVal) { + public static Map incomplete(Term... der) { + return Map.of(Entry.of((Variable) incompleteVar(), incomplete(list(der)).proxy())); + } + + public static Map binding(Term... varVal) { Map b = Map.of(); for (int i = 0; i < varVal.length; i += 2) { b = b.add(Entry.of((Variable) varVal[i], varVal[i + 1])); diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index d07d28f6..b8e6455e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -20,9 +20,9 @@ package org.modelingvalue.dclare.test; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.modelingvalue.dclare.Arithmetic.*; -import static org.modelingvalue.dclare.Arithmetic.is; import static org.modelingvalue.dclare.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; @@ -32,10 +32,12 @@ import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; +import org.modelingvalue.collections.util.SerializableFunction; import org.modelingvalue.dclare.Arithmetic; import org.modelingvalue.dclare.Arithmetic.IntLit; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Functor; +import org.modelingvalue.dclare.Logic.Goal; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; @@ -53,67 +55,87 @@ void run(Runnable test) { universeTransaction.waitForEnd(); } - static void isTrue(Term... goals) { - assertTrue(Logic.is(goals)); + static void isTrue(Goal goal) { + assertTrue(Logic.isTrue(goal)); } - static void isFalse(Term... goals) { - assertFalse(Logic.is(goals)); + static void isFalse(Goal goal) { + assertTrue(Logic.isFalse(goal)); } - static void hasResult(Set> bindings, Term... goals) { - assertEquals(bindings, eval(goals)); + static void isIncomplete(Goal goal) { + assertTrue(Logic.isIncomplete(goal)); } - @SuppressWarnings({"unchecked", "rawtypes"}) - static Set> set(Map... bindings) { - return Set.of(bindings); + @SafeVarargs + static void hasBindings(Goal goal, Map... bindings) { + assertEquals(Set.of(bindings), getBindings(goal)); } - // FamilyTree + // Root - interface Person extends Term { + interface Root extends Term { } - static Functor person = functor(LogicTest::person); + static Functor root = functor(LogicTest::root); - static Person person(String name) { - return term(person, name); + static Root root(String name) { + return term(root, name); } - static Person personVar(String name) { - return var(Person.class, name); + static Root rootVar(String name) { + return var(Root.class, name); } - interface ParentChild extends Term { + static Functor rootPerson = functor(LogicTest::rootPerson); + + static Term rootPerson(Root root, Person person) { + return term(rootPerson, root, person); } - static Functor parentChild = functor(LogicTest::parentChild); + // FamilyTree - static ParentChild parentChild(Person parent, Person child) { - return term(parentChild, parent, child); + interface Person extends Term { } - static ParentChild parentChildVar(String name) { - return var(ParentChild.class, name); + static Functor strPerson = functor((SerializableFunction) LogicTest::person); + + static Person person(String name) { + return term(strPerson, name); } - interface AncestorDescendent extends Term { + static Functor intPerson = functor((SerializableFunction) LogicTest::person); + + static Person person(IntLit i) { + return term(intPerson, i); } - static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); + static Person person(int i) { + return person(i(i)); + } - static AncestorDescendent ancestorDescendent(Person ancestor, Person descendent) { - return term(ancestorDescendent, ancestor, descendent); + static Person personVar(String name) { + return var(Person.class, name); } - static AncestorDescendent ancestorDescendentVar(String name) { - return var(AncestorDescendent.class, name); + static Functor parentChild = functor(LogicTest::parentChild); + + static Term parentChild(Person parent, Person child) { + return term(parentChild, parent, child); + } + + static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); + + static Term ancestorDescendent(Person ancestor, Person descendent) { + return term(ancestorDescendent, ancestor, descendent); } // Variables + Root U = rootVar("U"); + IntLit P = ilv("P"); + IntLit Q = ilv("Q"); Person A = personVar("A"); // Ancestor Person D = personVar("D"); // Descendent @@ -131,11 +153,13 @@ static AncestorDescendent ancestorDescendentVar(String name) { Person Heleen = person("Heleen"); Person Marijn = person("Marijn"); + Root Root = root("Root"); + @RepeatedTest(100) - public void famTest0() { + public void famTest1() { run(() -> { - rule(ancestorDescendent(A, D), parentChild(A, D)); - rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); + rule(ancestorDescendent(A, D), goal(parentChild(A, D))); + rule(ancestorDescendent(A, D), goal(ancestorDescendent(A, R), parentChild(R, D))); fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); @@ -145,49 +169,29 @@ public void famTest0() { fact(parentChild(Wim, Marijn)); fact(parentChild(Heleen, Marijn)); - isTrue(parentChild(Heleen, Joppe)); - isTrue(parentChild(Jan, Wim)); + isTrue(goal(parentChild(Heleen, Joppe))); + isTrue(goal(parentChild(Jan, Wim))); - isFalse(parentChild(Marijn, Wim)); - isFalse(parentChild(Heleen, Wim)); - isFalse(parentChild(Wim, Wim)); + isFalse(goal(parentChild(Marijn, Wim))); + isFalse(goal(parentChild(Heleen, Wim))); + isFalse(goal(parentChild(Wim, Wim))); - isTrue(ancestorDescendent(Wim, Marijn)); - isTrue(ancestorDescendent(Carel, Marijn)); + isTrue(goal(ancestorDescendent(Wim, Marijn))); + isTrue(goal(ancestorDescendent(Carel, Marijn))); - isFalse(ancestorDescendent(Marijn, Wim)); - isFalse(ancestorDescendent(Heleen, Wim)); - isFalse(ancestorDescendent(Joppe, Carel)); - isFalse(ancestorDescendent(Carel, Carel)); - }); - } - - @RepeatedTest(100) - public void famTest1() { - run(() -> { - rule(ancestorDescendent(A, D), parentChild(A, D)); - rule(ancestorDescendent(A, D), ancestorDescendent(A, R), parentChild(R, D)); - - fact(parentChild(Carel, Jan)); - fact(parentChild(Jan, Wim)); - - isTrue(parentChild(Carel, Jan)); - isTrue(parentChild(Jan, Wim)); - - isFalse(parentChild(Jan, Carel)); - isFalse(parentChild(Wim, Wim)); - - isTrue(ancestorDescendent(Carel, Jan)); - isTrue(ancestorDescendent(Carel, Wim)); + isFalse(goal(ancestorDescendent(Marijn, Wim))); + isFalse(goal(ancestorDescendent(Heleen, Wim))); + isFalse(goal(ancestorDescendent(Joppe, Carel))); + isFalse(goal(ancestorDescendent(Carel, Carel))); }); } @RepeatedTest(100) public void famTest2() { run(() -> { - rule(ancestorDescendent(A, D), parentChild(A, D)); - rule(ancestorDescendent(A, D), parentChild(A, B), parentChild(B, D)); - rule(ancestorDescendent(A, D), parentChild(A, B), ancestorDescendent(B, C), parentChild(C, D)); + rule(ancestorDescendent(A, D), goal(parentChild(A, D))); + rule(ancestorDescendent(A, D), goal(parentChild(A, B), parentChild(B, D))); + rule(ancestorDescendent(A, D), goal(parentChild(A, B), ancestorDescendent(B, C), parentChild(C, D))); Person Carel = person("Carel"); Person Jan = person("Jan"); @@ -196,20 +200,45 @@ public void famTest2() { fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); - hasResult(set(bind(A, Jan), bind(A, Carel)), ancestorDescendent(A, Wim)); - hasResult(set(bind(D, Jan), bind(D, Wim)), ancestorDescendent(Carel, D)); + hasBindings(goal(ancestorDescendent(A, Wim)), binding(A, Jan), binding(A, Carel)); + hasBindings(goal(ancestorDescendent(Carel, D)), binding(D, Jan), binding(D, Wim)); }); } @RepeatedTest(100) public void famTest3() { run(() -> { - rule(parentChild(B, C), parentChild(B, C)); + rule(parentChild(B, C), goal(parentChild(B, C))); Person Jan = person("Jan"); Person Wim = person("Wim"); - hasResult(set(incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))), parentChild(Wim, Jan)); + hasBindings(goal(parentChild(Wim, Jan)), incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))); + isIncomplete(goal(parentChild(Wim, Jan))); + }); + } + + @RepeatedTest(1) + public void famTest4() { + run(() -> { + Arithmetic.rules(); + + rule(parentChild(person(Q), person(P)), goal(lt(Q, i(4)), is(plus(Q, i(1)), P))); + rule(rootPerson(U, person(0)), goal()); + rule(rootPerson(U, D), goal(rootPerson(U, R), parentChild(R, D))); + + isTrue(goal(parentChild(person(0), person(1)))); + isTrue(goal(parentChild(person(3), person(4)))); + isFalse(goal(parentChild(person(4), person(5)))); + + isTrue(goal(rootPerson(Root, person(0)))); + isTrue(goal(rootPerson(Root, person(1)))); + isTrue(goal(rootPerson(Root, person(2)))); + isTrue(goal(rootPerson(Root, person(3)))); + isTrue(goal(rootPerson(Root, person(4)))); + + // hasBindings(goal(rootPerson(Root, D)), binding(D, person(0)), binding(D, person(1)), // + // binding(D, person(2)), binding(D, person(3)), binding(D, person(4))); }); } @@ -218,9 +247,9 @@ public void intTest() { run(() -> { Arithmetic.rules(); - hasResult(set(bind(P, i(10))), plus(i(7), i(3), P)); - hasResult(set(bind(P, i(3))), plus(i(7), P, i(10))); - hasResult(set(bind(P, i(7))), plus(P, i(3), i(10))); + hasBindings(goal(plus(i(7), i(3), P)), binding(P, i(10))); + hasBindings(goal(plus(i(7), P, i(10))), binding(P, i(3))); + hasBindings(goal(plus(P, i(3), i(10))), binding(P, i(7))); }); } @@ -229,22 +258,22 @@ public void isTest() { run(() -> { Arithmetic.rules(); - isTrue(is(plus(i(11), i(22)), i(33))); - isTrue(is(minus(i(33), i(22)), i(11))); - isTrue(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), i(110))); + isTrue(goal(is(plus(i(11), i(22)), i(33)))); + isTrue(goal(is(minus(i(33), i(22)), i(11)))); + isTrue(goal(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), i(110)))); - isTrue(is(plus(i(11), divide(multiply(i(44), i(33)), i(22))), i(77))); + isTrue(goal(is(plus(i(11), divide(multiply(i(44), i(33)), i(22))), i(77)))); - isTrue(is(sqrt(i(49)), i(7))); - isTrue(is(sqrt(i(49)), i(-7))); + isTrue(goal(is(sqrt(i(49)), i(7)))); + isTrue(goal(is(sqrt(i(49)), i(-7)))); - hasResult(set(bind(P, i(110))), is(plus(i(11), plus(plus(i(22), i(33)), i(44))), P)); - hasResult(set(bind(P, i(33))), is(plus(i(11), plus(plus(i(22), P), i(44))), i(110))); - hasResult(set(bind(P, i(10))), is(plus(i(7), i(3)), P)); - hasResult(set(bind(P, i(3))), is(plus(i(7), P), i(10))); - hasResult(set(bind(P, i(7))), is(plus(P, i(3)), i(10))); + hasBindings(goal(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), P)), binding(P, i(110))); + hasBindings(goal(is(plus(i(11), plus(plus(i(22), P), i(44))), i(110))), binding(P, i(33))); + hasBindings(goal(is(plus(i(7), i(3)), P)), binding(P, i(10))); + hasBindings(goal(is(plus(i(7), P), i(10))), binding(P, i(3))); + hasBindings(goal(is(plus(P, i(3)), i(10))), binding(P, i(7))); - hasResult(set(bind(P, i(7)), bind(P, i(-7))), is(sqrt(i(49)), P)); + hasBindings(goal(is(sqrt(i(49)), P)), binding(P, i(7)), binding(P, i(-7))); }); } From 79af91ef9b6c813778ea264800a7aca166315313 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 5 Dec 2024 14:02:39 +0100 Subject: [PATCH 120/179] recursion on cycle --- .../java/org/modelingvalue/dclare/Logic.java | 152 +++++++++--------- .../modelingvalue/dclare/test/LogicTest.java | 4 +- 2 files changed, 79 insertions(+), 77 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 5d5ea16a..cb1244e0 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -46,29 +46,27 @@ public class Logic { - private static final boolean USE_EXTEND = Boolean.getBoolean("USE_EXTEND"); - @SuppressWarnings("rawtypes") - private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); - - private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { - if (l == null) { - return List.of(e); - } else { - int p = e.rulePrio(); - for (int i = 0; i < l.size(); i++) { - if (l.get(i).rulePrio() > p) { - return l.insert(i, e); - } - } - return l.append(e); - } - }; + private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); + + private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { + if (l == null) { + return List.of(e); + } else { + int p = e.rulePrio(); + for (int i = 0; i < l.size(); i++) { + if (l.get(i).rulePrio() > p) { + return l.insert(i, e); + } + } + return l.append(e); + } + }; @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); + private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); + private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; @@ -484,30 +482,10 @@ public FunctImpl functor() { protected final void makeFact() { FACTS.force(this, ADD_FACT, this); Object[] array = toArray(); - if (USE_EXTEND) { - patterns(1, array); - } else { - for (int i = 1; i < array.length; i++) { - array[i] = getType(i); - FACTS.force(term(array), ADD_FACT, this); - array = toArray(); - } - } - } - - private void patterns(int i, Object[] array) { - if (i < length()) { - array = array.clone(); - if (array[i] == null) { - array[i] = get(i); - FACTS.force(term(array), ADD_FACT, this); - } - patterns(i + 1, array); - if (array[i] != null) { - array[i] = getType(i); - FACTS.force(term(array), ADD_FACT, this); - } - patterns(i + 1, array); + for (int i = 1; i < array.length; i++) { + array[i] = getType(i); + FACTS.force(term(array), ADD_FACT, this); + array = toArray(); } } @@ -620,10 +598,10 @@ public Set incomplete() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection match(List der) { + protected Collection match(List der, Map> rec) { int non = nrOfNulls(); int len = length(); - if (!USE_EXTEND && (non > 1 || non >= len - 1)) { + if (non > 1 || non >= len - 1) { return Set.of(Logic.incomplete(der.append(this))); } else { Set facts = FACTS.get(this); @@ -636,30 +614,30 @@ protected Collection match(List der) { if (rules != null) { int i = der.lastIndexOf(this); if (i >= 0) { - return Set.of(Logic.incomplete(der.sublist(i, der.size()).append(this))); + Set r = rec.get(this); + if (r != null) { + return r; + } else { + return Set.of(Logic.incomplete(der.sublist(i, der.size()).append(this))); + } } else { - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this, der.append(this)); - if (non == 0) { - eval = eval.asSet(); - if (eval.equals(Set.of(this))) { - r = eval; - break; - } + der = der.append(this); + Set set = Set.of(), add = Set.of(); + boolean found = false, incomplete = false; + do { + add = or(rules, non, der, add.isEmpty() ? rec : rec.put(this, add)).removeAll(set); + found = add.anyMatch(this::equalFunctor); + incomplete |= add.anyMatch(this::isIncomplete); + if (incomplete && found && set.isEmpty()) { + add = add.filter(this::equalFunctor).asSet(); } - r = Collection.concat(r, eval); - } - if (non < 2 && non < len - 1) { - Set set = r.asSet(); - FACTS.force(this, set); - for (TermImpl e : set) { - FACTS.force(e, Set.of(e)); - } - return set; - } else { - return r; + set = set.addAll(add); + } while (found && incomplete); + FACTS.force(this, set); + for (TermImpl e : set) { + FACTS.force(e, Set.of(e)); } + return set; } } else { return Set.of(); @@ -671,10 +649,26 @@ protected Collection match(List der) { } } + @SuppressWarnings("rawtypes") + private Set or(List rules, int non, List der, Map> rec) { + Collection r = Set.of(); + for (RuleImpl rule : rules) { + Collection eval = rule.eval(this, der, rec); + if (non == 0) { + eval = eval.asSet(); + if (eval.equals(Set.of(this))) { + return (Set) eval; + } + } + r = Collection.concat(r, eval); + } + return r.asSet(); + } + @SuppressWarnings("rawtypes") protected int termPrio(List der) { int non = nrOfNulls(); - if (!USE_EXTEND && (non > 1 || non >= length() - 1)) { + if (non > 1 || non >= length() - 1) { return Integer.MAX_VALUE; } else { Set facts = FACTS.get(this); @@ -757,6 +751,14 @@ protected int nrOfNulls() { return nr; } + protected boolean equalFunctor(TermImpl other) { + return functor() == other.functor(); + } + + protected boolean isIncomplete(TermImpl other) { + return other.functor() == INCOMPLETE_FUNCTOR && ((TermImpl) other.get(1)).list().contains(this); + } + protected boolean isIncomplete() { return functor() == INCOMPLETE_FUNCTOR; } @@ -811,13 +813,13 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection eval(TermImpl term, List der) { + protected Collection eval(TermImpl term, List der, Map> rec) { TermImpl head = term(); Map binding = head.getBinding(term, Map.of()); if (binding == null) { return Set.of(); } else { - Collection> r = goal().eval(variables().putAll(binding), der); + Collection> r = goal().eval(variables().putAll(binding), der, rec); return r.map(m -> { TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); return it != null ? it : head.setBinding(m); @@ -906,12 +908,12 @@ protected GoalImpl term(Object[] array) { @SuppressWarnings("rawtypes") public Collection> eval() { - return eval(variables(), List.of()); + return eval(variables(), List.of(), Map.of()); } @SuppressWarnings("rawtypes") - protected Collection> eval(Map vars, List der) { - return eval(goals(), Set.of(vars), der); + protected Collection> eval(Map vars, List der, Map> rec) { + return eval(goals(), Set.of(vars), der, rec); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -920,7 +922,7 @@ protected List goals() { } @SuppressWarnings({"rawtypes", "unchecked"}) - private Collection> eval(List goals, Collection> vars, List der) { + private Collection> eval(List goals, Collection> vars, List der, Map> rec) { if (goals.isEmpty()) { return vars; } else { @@ -935,7 +937,7 @@ private Collection> eval(List goals, Collection m = f.match(der); + Collection m = f.match(der, rec); return eval(goals.removeIndex(i), m.> map(t -> { if (t.type() == Incomplete.class) { return Map.of(Entry.of(INCOMPLETE_VAR, t)); @@ -943,7 +945,7 @@ private Collection> eval(List goals, Collection b = g.getBinding(t, Map.of()); return b == null ? Map.of() : v.putAll(b); } - }), der); + }), der, rec); } }); } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index b8e6455e..0d6b9842 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -237,8 +237,8 @@ public void famTest4() { isTrue(goal(rootPerson(Root, person(3)))); isTrue(goal(rootPerson(Root, person(4)))); - // hasBindings(goal(rootPerson(Root, D)), binding(D, person(0)), binding(D, person(1)), // - // binding(D, person(2)), binding(D, person(3)), binding(D, person(4))); + hasBindings(goal(rootPerson(Root, D)), binding(D, person(0)), binding(D, person(1)), // + binding(D, person(2)), binding(D, person(3)), binding(D, person(4))); }); } From 87a5e47677add05c843d0ecb44256eaadb1fcd47 Mon Sep 17 00:00:00 2001 From: automation Date: Thu, 5 Dec 2024 13:03:40 +0000 Subject: [PATCH 121/179] [no-ci] updated by mvgplugin --- .../org/modelingvalue/dclare/Arithmetic.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java index 9f5526cf..45fac3e4 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare; import java.math.BigInteger; From 2bb26042da3ee72acb5a0c467d3b8406ca1233bd Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 5 Dec 2024 16:57:18 +0100 Subject: [PATCH 122/179] semantic fixes --- .../java/org/modelingvalue/dclare/Logic.java | 168 +++++++++++------- .../modelingvalue/dclare/test/LogicTest.java | 15 +- 2 files changed, 108 insertions(+), 75 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index cb1244e0..867f9a4c 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -46,27 +46,29 @@ public class Logic { + private static final boolean TRACE_LOGIC = Boolean.getBoolean("TRACE_LOGIC"); + @SuppressWarnings("rawtypes") - private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); - - private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { - if (l == null) { - return List.of(e); - } else { - int p = e.rulePrio(); - for (int i = 0; i < l.size(); i++) { - if (l.get(i).rulePrio() > p) { - return l.insert(i, e); - } - } - return l.append(e); - } - }; + private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); + + private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { + if (l == null) { + return List.of(e); + } else { + int p = e.rulePrio(); + for (int i = 0; i < l.size(); i++) { + if (l.get(i).rulePrio() > p) { + return l.insert(i, e); + } + } + return l.append(e); + } + }; @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); + private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); @SuppressWarnings("rawtypes") - private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); + private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { private static final long serialVersionUID = 7315776001191198132L; @@ -598,17 +600,18 @@ public Set incomplete() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection match(List der, Map> rec) { + protected Collection match(TermImpl goal, List der, Map> rec) { int non = nrOfNulls(); - int len = length(); - if (non > 1 || non >= len - 1) { + if (non > 1 || non >= totalLength()) { return Set.of(Logic.incomplete(der.append(this))); } else { - Set facts = FACTS.get(this); - if (facts == null) { - SerializableFunction, Collection> lambda = functor().lambda(); - if (lambda != null) { - return lambda.apply(this); + SerializableFunction, Collection> lambda = functor().lambda(); + if (lambda != null) { + return lambda.apply(this); + } else { + Set facts = FACTS.get(this); + if (facts != null) { + return facts; } else { List rules = RULES.get(functor()); if (rules != null) { @@ -643,47 +646,29 @@ protected Collection match(List der, Map or(List rules, int non, List der, Map> rec) { - Collection r = Set.of(); - for (RuleImpl rule : rules) { - Collection eval = rule.eval(this, der, rec); - if (non == 0) { - eval = eval.asSet(); - if (eval.equals(Set.of(this))) { - return (Set) eval; - } - } - r = Collection.concat(r, eval); - } - return r.asSet(); - } - - @SuppressWarnings("rawtypes") - protected int termPrio(List der) { + protected int termPrio(TermImpl goal, List der) { int non = nrOfNulls(); - if (non > 1 || non >= length() - 1) { + if (non > 1 || non >= totalLength()) { return Integer.MAX_VALUE; } else { - Set facts = FACTS.get(this); - if (facts != null) { - return Integer.MIN_VALUE + facts.size(); + SerializableFunction, Collection> lambda = functor().lambda(); + if (lambda != null) { + Collection result = lambda.apply(this); + if (result instanceof Set) { + Set set = (Set) result; + return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); + } else { + return non; + } } else { - SerializableFunction, Collection> lambda = functor().lambda(); - if (lambda != null) { - Collection result = lambda.apply(this); - if (result instanceof Set) { - Set set = (Set) result; - return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); - } else { - return non; - } + Set facts = FACTS.get(this); + if (facts != null) { + return Integer.MIN_VALUE + facts.size(); } else { List rules = RULES.get(functor()); if (rules != null) { @@ -693,15 +678,28 @@ protected int termPrio(List der) { return Integer.MAX_VALUE; } } - return non; - + return non - nrOfBindings(goal); + } else { + return Integer.MIN_VALUE; } } } - return Integer.MIN_VALUE; } } + @SuppressWarnings("rawtypes") + private Set or(List rules, int non, List der, Map> rec) { + Set r = Set.of(); + for (RuleImpl rule : rules) { + Set eval = rule.eval(this, der, rec); + if (non == 0 && eval.equals(Set.of(this))) { + return (Set) eval; + } + r = r.addAll(eval); + } + return r; + } + @SuppressWarnings("rawtypes") private int moreNullsThen(TermImpl other) { if (!get(0).equals(other.get(0))) { @@ -740,21 +738,54 @@ protected List list() { return l; } + @SuppressWarnings("rawtypes") protected int nrOfNulls() { int nr = 0; for (int i = 1; i < length(); i++) { Object v = get(i); if (v == null || v instanceof Class) { nr++; + } else if (v instanceof TermImpl) { + nr += ((TermImpl) v).nrOfNulls(); } } return nr; } + @SuppressWarnings("rawtypes") + protected int totalLength() { + int nr = 0; + for (int i = 1; i < length(); i++) { + Object v = get(i); + if (v instanceof TermImpl) { + nr += ((TermImpl) v).totalLength(); + } + nr++; + } + return nr; + } + + @SuppressWarnings("rawtypes") + protected int nrOfBindings(TermImpl goal) { + int nr = 0; + for (int i = 1; i < length(); i++) { + Object g = goal.get(i); + Object v = get(i); + if (g instanceof VarImpl && !(v == null || v instanceof Class)) { + nr++; + } else if (g instanceof TermImpl && v instanceof TermImpl) { + nr += ((TermImpl) v).nrOfBindings((TermImpl) g); + } + } + return nr; + } + + @SuppressWarnings("rawtypes") protected boolean equalFunctor(TermImpl other) { return functor() == other.functor(); } + @SuppressWarnings("rawtypes") protected boolean isIncomplete(TermImpl other) { return other.functor() == INCOMPLETE_FUNCTOR && ((TermImpl) other.get(1)).list().contains(this); } @@ -813,17 +844,20 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection eval(TermImpl term, List der, Map> rec) { + protected Set eval(TermImpl term, List der, Map> rec) { TermImpl head = term(); Map binding = head.getBinding(term, Map.of()); if (binding == null) { return Set.of(); } else { + if (TRACE_LOGIC) { + System.err.println("!!!!!!!!!!!!!! " + " ".repeat(der.size()) + this + " " + binding.toString().substring(3)); + } Collection> r = goal().eval(variables().putAll(binding), der, rec); return r.map(m -> { TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); return it != null ? it : head.setBinding(m); - }); + }).asSet(); } } @@ -934,10 +968,10 @@ private Collection> eval(List goals, Collection m = f.match(der, rec); + Collection m = f.match(g, der, rec); return eval(goals.removeIndex(i), m.> map(t -> { if (t.type() == Incomplete.class) { return Map.of(Entry.of(INCOMPLETE_VAR, t)); @@ -952,11 +986,11 @@ private Collection> eval(List goals, Collection list, List der) { + private static int first(List actual, List goals, List der) { int first = -1; int min = Integer.MAX_VALUE; - for (int i = 0; i < list.size(); i++) { - int prio = list.get(i).termPrio(der); + for (int i = 0; i < actual.size(); i++) { + int prio = actual.get(i).termPrio(goals.get(i), der); if (first == -1 || prio < min) { first = i; min = prio; diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 0d6b9842..9e4ea36e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -137,11 +137,11 @@ static Term ancestorDescendent(Person ancestor, Person descendent) { IntLit P = ilv("P"); IntLit Q = ilv("Q"); - Person A = personVar("A"); // Ancestor - Person D = personVar("D"); // Descendent - Person R = personVar("R"); // Relative - Person B = personVar("B"); // Relative1 - Person C = personVar("C"); // Relative2 + Person A = personVar("A"); + Person D = personVar("D"); + Person R = personVar("R"); + Person B = personVar("B"); + Person C = personVar("C"); // Terms @@ -190,8 +190,7 @@ public void famTest1() { public void famTest2() { run(() -> { rule(ancestorDescendent(A, D), goal(parentChild(A, D))); - rule(ancestorDescendent(A, D), goal(parentChild(A, B), parentChild(B, D))); - rule(ancestorDescendent(A, D), goal(parentChild(A, B), ancestorDescendent(B, C), parentChild(C, D))); + rule(ancestorDescendent(A, D), goal(ancestorDescendent(A, C), parentChild(C, D))); Person Carel = person("Carel"); Person Jan = person("Jan"); @@ -218,7 +217,7 @@ public void famTest3() { }); } - @RepeatedTest(1) + @RepeatedTest(100) public void famTest4() { run(() -> { Arithmetic.rules(); From fa1a4afe6be368a53ebd4d51152c4594a24e2523 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 09:26:38 +0100 Subject: [PATCH 123/179] use rec in prio --- .../java/org/modelingvalue/dclare/Logic.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 867f9a4c..ffdb5a1a 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -651,7 +651,7 @@ protected Collection match(TermImpl goal, List der, Map der) { + protected int termPrio(TermImpl goal, List der, Map> rec) { int non = nrOfNulls(); if (non > 1 || non >= totalLength()) { return Integer.MAX_VALUE; @@ -672,13 +672,18 @@ protected int termPrio(TermImpl goal, List der) { } else { List rules = RULES.get(functor()); if (rules != null) { - for (int i = der.size() - 1; i >= 0; i--) { - TermImpl other = der.get(i); - if (equals(other) || moreNullsThen(other) >= 0) { - return Integer.MAX_VALUE; + Set r = rec.get(this); + if (r != null) { + return Integer.MIN_VALUE + r.size(); + } else { + for (int i = der.size() - 1; i >= 0; i--) { + TermImpl other = der.get(i); + if (equals(other) || moreNullsThen(other) >= 0) { + return Integer.MAX_VALUE; + } } + return non - nrOfBindings(goal); } - return non - nrOfBindings(goal); } else { return Integer.MIN_VALUE; } @@ -968,7 +973,7 @@ private Collection> eval(List goals, Collection m = f.match(g, der, rec); @@ -986,11 +991,11 @@ private Collection> eval(List goals, Collection actual, List goals, List der) { + private static int first(List actual, List goals, List der, Map> rec) { int first = -1; int min = Integer.MAX_VALUE; for (int i = 0; i < actual.size(); i++) { - int prio = actual.get(i).termPrio(goals.get(i), der); + int prio = actual.get(i).termPrio(goals.get(i), der, rec); if (first == -1 || prio < min) { first = i; min = prio; From b54ef02bf28982bba7c2cc8b0b73260d409d90c3 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 09:50:34 +0100 Subject: [PATCH 124/179] Predicates --- .../org/modelingvalue/dclare/Arithmetic.java | 93 ++++---- .../java/org/modelingvalue/dclare/Logic.java | 211 ++++++++---------- .../modelingvalue/dclare/test/LogicTest.java | 23 +- 3 files changed, 156 insertions(+), 171 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java index 45fac3e4..a830253f 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -31,9 +31,9 @@ public class Arithmetic extends Logic { // Is - private static Functor is = functor((SerializableBiFunction) Arithmetic::is); + private static Functor is = functor((SerializableBiFunction) Arithmetic::is); - public static Pred is(Int i, IntLit r) { + public static Pred is(Int i, IntAtom r) { return term(is, i, r); } @@ -42,28 +42,28 @@ public static Pred is(Int i, IntLit r) { public static interface Int extends Term { } - public static interface IntLit extends Int { + public static interface IntAtom extends Int { } - public static interface IntFun extends Int { + public static interface IntFunc extends Int { } - private static Functor i = functor((SerializableFunction) Arithmetic::i); + private static Functor i = functor((SerializableFunction) Arithmetic::i); - private static IntLit i(BigInteger x) { + private static IntAtom i(BigInteger x) { return term(i, x); } - public static IntLit i(long x) { + public static IntAtom i(long x) { return i(BigInteger.valueOf(x)); } - public static IntLit ilv(String name) { - return var(IntLit.class, name); + public static IntAtom ilv(String name) { + return var(IntAtom.class, name); } - public static IntFun ifv(String name) { - return var(IntFun.class, name); + public static IntFunc ifv(String name) { + return var(IntFunc.class, name); } public static Int iv(String name) { @@ -72,14 +72,11 @@ public static Int iv(String name) { // Operators - public static interface Pred extends Term { - } - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor compare = functor((SerializableTriFunction) Arithmetic::compare, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); + private static Functor compare = functor((SerializableTriFunction) Arithmetic::compare, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); BigInteger ai = at != null ? at.getVal(1) : null; BigInteger bi = bt != null ? bt.getVal(1) : null; BigInteger ci = ct != null ? ct.getVal(1) : null; @@ -100,15 +97,15 @@ public static interface Pred extends Term { return t.incomplete(); }); - public static Pred compare(IntLit a, IntLit b, IntLit c) { + public static Pred compare(IntAtom a, IntAtom b, IntAtom c) { return term(compare, a, b, c); } @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor plusPred = functor((SerializableTriFunction) Arithmetic::plus, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); + private static Functor plusPred = functor((SerializableTriFunction) Arithmetic::plus, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); BigInteger ai = at != null ? at.getVal(1) : null; BigInteger bi = bt != null ? bt.getVal(1) : null; BigInteger ci = ct != null ? ct.getVal(1) : null; @@ -125,15 +122,15 @@ public static Pred compare(IntLit a, IntLit b, IntLit c) { } }); - public static Pred plus(IntLit a, IntLit b, IntLit r) { + public static Pred plus(IntAtom a, IntAtom b, IntAtom r) { return term(plusPred, a, b, r); } @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor multiplyPred = functor((SerializableTriFunction) Arithmetic::multiply, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); + private static Functor multiplyPred = functor((SerializableTriFunction) Arithmetic::multiply, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); + TermImpl ct = t.getTerm(3); BigInteger ai = at != null ? at.getVal(1) : null; BigInteger bi = bt != null ? bt.getVal(1) : null; BigInteger ci = ct != null ? ct.getVal(1) : null; @@ -150,14 +147,14 @@ public static Pred plus(IntLit a, IntLit b, IntLit r) { } }); - public static Pred multiply(IntLit a, IntLit b, IntLit r) { + public static Pred multiply(IntAtom a, IntAtom b, IntAtom r) { return term(multiplyPred, a, b, r); } @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor powerPred = functor((SerializableBiFunction) Arithmetic::power, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); + private static Functor powerPred = functor((SerializableBiFunction) Arithmetic::power, t -> { + TermImpl at = t.getTerm(1); + TermImpl bt = t.getTerm(2); BigInteger ai = at != null ? at.getVal(1) : null; BigInteger bi = bt != null ? bt.getVal(1) : null; if (ai != null && bi != null) { @@ -172,7 +169,7 @@ public static Pred multiply(IntLit a, IntLit b, IntLit r) { } }); - public static Pred power(IntLit a, IntLit r) { + public static Pred power(IntAtom a, IntAtom r) { return term(powerPred, a, r); } @@ -202,48 +199,48 @@ public static Pred le(Int a, Int b) { return term(le, a, b); } - private static Functor plusFunc = functor((SerializableBiFunction) Arithmetic::plus); + private static Functor plusFunc = functor((SerializableBiFunction) Arithmetic::plus); - public static IntFun plus(Int a, Int b) { + public static IntFunc plus(Int a, Int b) { return term(plusFunc, a, b); } - private static Functor minusFunc = functor((SerializableBiFunction) Arithmetic::minus); + private static Functor minusFunc = functor((SerializableBiFunction) Arithmetic::minus); - public static IntFun minus(Int a, Int b) { + public static IntFunc minus(Int a, Int b) { return term(minusFunc, a, b); } - private static Functor multiplyFunc = functor((SerializableBiFunction) Arithmetic::multiply); + private static Functor multiplyFunc = functor((SerializableBiFunction) Arithmetic::multiply); - public static IntFun multiply(Int a, Int b) { + public static IntFunc multiply(Int a, Int b) { return term(multiplyFunc, a, b); } - private static Functor divideFunc = functor((SerializableBiFunction) Arithmetic::divide); + private static Functor divideFunc = functor((SerializableBiFunction) Arithmetic::divide); - public static IntFun divide(Int a, Int b) { + public static IntFunc divide(Int a, Int b) { return term(divideFunc, a, b); } - private static Functor powerFunc = functor((SerializableFunction) Arithmetic::power); + private static Functor powerFunc = functor((SerializableFunction) Arithmetic::power); - public static IntFun power(Int a) { + public static IntFunc power(Int a) { return term(powerFunc, a); } - private static Functor sqrtFunc = functor((SerializableFunction) Arithmetic::sqrt); + private static Functor sqrtFunc = functor((SerializableFunction) Arithmetic::sqrt); - public static IntFun sqrt(Int a) { + public static IntFunc sqrt(Int a) { return term(sqrtFunc, a); } // Is Rules public static void rules() { - IntLit PL = ilv("PL"); - IntLit QL = ilv("QL"); - IntLit RL = ilv("RL"); + IntAtom PL = ilv("PL"); + IntAtom QL = ilv("QL"); + IntAtom RL = ilv("RL"); Int X = iv("X"); Int Y = iv("Y"); diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index ffdb5a1a..32015e42 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -42,7 +42,6 @@ import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; -import org.modelingvalue.dclare.Arithmetic.Pred; public class Logic { @@ -413,6 +412,9 @@ protected Class type() { public static interface Term { } + public static interface Pred extends Term { + } + @SuppressWarnings("unchecked") public static F term(Functor functor, Object... args) { return new TermImpl(functor, args).proxy(); @@ -604,50 +606,44 @@ protected Collection match(TermImpl goal, List der, Map 1 || non >= totalLength()) { return Set.of(Logic.incomplete(der.append(this))); - } else { - SerializableFunction, Collection> lambda = functor().lambda(); - if (lambda != null) { - return lambda.apply(this); - } else { - Set facts = FACTS.get(this); - if (facts != null) { - return facts; - } else { - List rules = RULES.get(functor()); - if (rules != null) { - int i = der.lastIndexOf(this); - if (i >= 0) { - Set r = rec.get(this); - if (r != null) { - return r; - } else { - return Set.of(Logic.incomplete(der.sublist(i, der.size()).append(this))); - } - } else { - der = der.append(this); - Set set = Set.of(), add = Set.of(); - boolean found = false, incomplete = false; - do { - add = or(rules, non, der, add.isEmpty() ? rec : rec.put(this, add)).removeAll(set); - found = add.anyMatch(this::equalFunctor); - incomplete |= add.anyMatch(this::isIncomplete); - if (incomplete && found && set.isEmpty()) { - add = add.filter(this::equalFunctor).asSet(); - } - set = set.addAll(add); - } while (found && incomplete); - FACTS.force(this, set); - for (TermImpl e : set) { - FACTS.force(e, Set.of(e)); - } - return set; - } - } else { - return Set.of(); - } + } + SerializableFunction, Collection> lambda = functor().lambda(); + if (lambda != null) { + return lambda.apply(this); + } + Set facts = FACTS.get(this); + if (facts != null) { + return facts; + } + List rules = RULES.get(functor()); + if (rules != null) { + Set r = rec.get(this); + if (r != null) { + return r; + } + int i = der.lastIndexOf(this); + if (i >= 0) { + return Set.of(Logic.incomplete(der.sublist(i, der.size()).append(this))); + } + der = der.append(this); + Set set = Set.of(), add = Set.of(); + boolean found = false, incomplete = false; + do { + add = or(rules, non, der, add.isEmpty() ? rec : rec.put(this, add)).removeAll(set); + found = add.anyMatch(this::equalFunctor); + incomplete |= add.anyMatch(this::isIncomplete); + if (incomplete && found && set.isEmpty()) { + add = add.filter(this::equalFunctor).asSet(); } + set = set.addAll(add); + } while (found && incomplete); + FACTS.force(this, set); + for (TermImpl e : set) { + FACTS.force(e, Set.of(e)); } + return set; } + return Set.of(); } @SuppressWarnings("rawtypes") @@ -655,41 +651,35 @@ protected int termPrio(TermImpl goal, List der, Map 1 || non >= totalLength()) { return Integer.MAX_VALUE; - } else { - SerializableFunction, Collection> lambda = functor().lambda(); - if (lambda != null) { - Collection result = lambda.apply(this); - if (result instanceof Set) { - Set set = (Set) result; - return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); - } else { - return non; - } - } else { - Set facts = FACTS.get(this); - if (facts != null) { - return Integer.MIN_VALUE + facts.size(); - } else { - List rules = RULES.get(functor()); - if (rules != null) { - Set r = rec.get(this); - if (r != null) { - return Integer.MIN_VALUE + r.size(); - } else { - for (int i = der.size() - 1; i >= 0; i--) { - TermImpl other = der.get(i); - if (equals(other) || moreNullsThen(other) >= 0) { - return Integer.MAX_VALUE; - } - } - return non - nrOfBindings(goal); - } - } else { - return Integer.MIN_VALUE; - } + } + SerializableFunction, Collection> lambda = functor().lambda(); + if (lambda != null) { + Collection result = lambda.apply(this); + if (result instanceof Set) { + Set set = (Set) result; + return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); + } + return non; + } + Set facts = FACTS.get(this); + if (facts != null) { + return Integer.MIN_VALUE + facts.size(); + } + List rules = RULES.get(functor()); + if (rules != null) { + Set r = rec.get(this); + if (r != null) { + return Integer.MIN_VALUE + r.size(); + } + for (int i = der.size() - 1; i >= 0; i--) { + TermImpl other = der.get(i); + if (equals(other) || moreNullsThen(other) >= 0) { + return Integer.MAX_VALUE; } } + return non - nrOfBindings(goal); } + return Integer.MIN_VALUE; } @SuppressWarnings("rawtypes") @@ -805,13 +795,13 @@ protected boolean isIncomplete() { public static interface Rule extends Term { } - private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule, null); + private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule, null); private static final Functor RULE_FUNCTOR_PROXY = RULE_FUNCTOR.proxy(); @SuppressWarnings({"unchecked", "rawtypes"}) - public static Rule rule(Term term, Goal goal) { - RuleImpl ruleImpl = new RuleImpl(term, goal); - TermImpl termImpl = Logic. unproxy(term); + public static Rule rule(Pred pred, Goal goal) { + RuleImpl ruleImpl = new RuleImpl(pred, goal); + TermImpl termImpl = Logic. unproxy(pred); RULES.force(termImpl.functor(), ADD_RULE, ruleImpl); return ruleImpl.proxy(); } @@ -854,16 +844,15 @@ protected Set eval(TermImpl term, List der, Map binding = head.getBinding(term, Map.of()); if (binding == null) { return Set.of(); - } else { - if (TRACE_LOGIC) { - System.err.println("!!!!!!!!!!!!!! " + " ".repeat(der.size()) + this + " " + binding.toString().substring(3)); - } - Collection> r = goal().eval(variables().putAll(binding), der, rec); - return r.map(m -> { - TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); - return it != null ? it : head.setBinding(m); - }).asSet(); } + if (TRACE_LOGIC) { + System.err.println("!!!!!!!!!!!!!! " + " ".repeat(der.size()) + this + " " + binding.toString().substring(3)); + } + Collection> r = goal().eval(variables().putAll(binding), der, rec); + return r.map(m -> { + TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); + return it != null ? it : head.setBinding(m); + }).asSet(); } @Override @@ -908,19 +897,19 @@ public static Set> getBindings(Goal goal) { } @SuppressWarnings({"unchecked", "rawtypes"}) - public static Goal goal(Term... goals) { + public static Goal goal(Pred... goals) { return new GoalImpl(list(goals)).proxy(); } @SuppressWarnings("unchecked") - public static Goal goal(L goals) { + public static Goal goal(L goals) { return new GoalImpl(goals).proxy(); } private static final class GoalImpl extends TermImpl { private static final long serialVersionUID = -4100263206389367132L; - private GoalImpl(L goals) { + private GoalImpl(L goals) { super(GOAL_FUNCTOR_PROXY, goals); } @@ -964,30 +953,28 @@ protected List goals() { private Collection> eval(List goals, Collection> vars, List der, Map> rec) { if (goals.isEmpty()) { return vars; - } else { - return vars.> flatMap(v -> { - if (v.containsKey(INCOMPLETE_VAR)) { - return Set.of(v); + } + return vars.> flatMap(v -> { + if (v.containsKey(INCOMPLETE_VAR)) { + return Set.of(v); + } + List actual = List.of(); + for (TermImpl g : goals) { + actual = actual.add(g.setBinding(v)); + } + int i = first(actual, goals, der, rec); + TermImpl f = actual.get(i); + TermImpl g = goals.get(i); + Collection m = f.match(g, der, rec); + return eval(goals.removeIndex(i), m.> map(t -> { + if (t.type() == Incomplete.class) { + return Map.of(Entry.of(INCOMPLETE_VAR, t)); } else { - List actual = List.of(); - for (TermImpl g : goals) { - actual = actual.add(g.setBinding(v)); - } - int i = first(actual, goals, der, rec); - TermImpl f = actual.get(i); - TermImpl g = goals.get(i); - Collection m = f.match(g, der, rec); - return eval(goals.removeIndex(i), m.> map(t -> { - if (t.type() == Incomplete.class) { - return Map.of(Entry.of(INCOMPLETE_VAR, t)); - } else { - Map b = g.getBinding(t, Map.of()); - return b == null ? Map.of() : v.putAll(b); - } - }), der, rec); + Map b = g.getBinding(t, Map.of()); + return b == null ? Map.of() : v.putAll(b); } - }); - } + }), der, rec); + }); } @SuppressWarnings({"rawtypes", "unchecked"}) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 9e4ea36e..8cdf2ec2 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -34,10 +34,11 @@ import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.SerializableFunction; import org.modelingvalue.dclare.Arithmetic; -import org.modelingvalue.dclare.Arithmetic.IntLit; +import org.modelingvalue.dclare.Arithmetic.IntAtom; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Goal; +import org.modelingvalue.dclare.Logic.Pred; import org.modelingvalue.dclare.Logic.Term; import org.modelingvalue.dclare.Logic.Variable; import org.modelingvalue.dclare.Universe; @@ -87,9 +88,9 @@ static Root rootVar(String name) { return var(Root.class, name); } - static Functor rootPerson = functor(LogicTest::rootPerson); + static Functor rootPerson = functor(LogicTest::rootPerson); - static Term rootPerson(Root root, Person person) { + static Pred rootPerson(Root root, Person person) { return term(rootPerson, root, person); } @@ -104,9 +105,9 @@ static Person person(String name) { return term(strPerson, name); } - static Functor intPerson = functor((SerializableFunction) LogicTest::person); + static Functor intPerson = functor((SerializableFunction) LogicTest::person); - static Person person(IntLit i) { + static Person person(IntAtom i) { return term(intPerson, i); } @@ -118,15 +119,15 @@ static Person personVar(String name) { return var(Person.class, name); } - static Functor parentChild = functor(LogicTest::parentChild); + static Functor parentChild = functor(LogicTest::parentChild); - static Term parentChild(Person parent, Person child) { + static Pred parentChild(Person parent, Person child) { return term(parentChild, parent, child); } - static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); + static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); - static Term ancestorDescendent(Person ancestor, Person descendent) { + static Pred ancestorDescendent(Person ancestor, Person descendent) { return term(ancestorDescendent, ancestor, descendent); } @@ -134,8 +135,8 @@ static Term ancestorDescendent(Person ancestor, Person descendent) { Root U = rootVar("U"); - IntLit P = ilv("P"); - IntLit Q = ilv("Q"); + IntAtom P = ilv("P"); + IntAtom Q = ilv("Q"); Person A = personVar("A"); Person D = personVar("D"); From d48fad56b2c275e7e51644d4d4449defcb9de326 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 10:57:50 +0100 Subject: [PATCH 125/179] functions for family tree --- .../org/modelingvalue/dclare/Arithmetic.java | 15 +- .../java/org/modelingvalue/dclare/Logic.java | 37 ++++- .../modelingvalue/dclare/test/LogicTest.java | 157 +++++++++++++----- 3 files changed, 157 insertions(+), 52 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java index a830253f..5aa72fdf 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -29,23 +29,15 @@ public class Arithmetic extends Logic { - // Is - - private static Functor is = functor((SerializableBiFunction) Arithmetic::is); - - public static Pred is(Int i, IntAtom r) { - return term(is, i, r); - } - // Integer public static interface Int extends Term { } - public static interface IntAtom extends Int { + public static interface IntAtom extends Int, Atom { } - public static interface IntFunc extends Int { + public static interface IntFunc extends Int, Func { } private static Functor i = functor((SerializableFunction) Arithmetic::i); @@ -238,6 +230,8 @@ public static IntFunc sqrt(Int a) { // Is Rules public static void rules() { + Logic.isAtomRule(); + IntAtom PL = ilv("PL"); IntAtom QL = ilv("QL"); IntAtom RL = ilv("RL"); @@ -245,7 +239,6 @@ public static void rules() { Int X = iv("X"); Int Y = iv("Y"); - rule(is(PL, RL), goal(eq(PL, RL))); rule(is(plus(X, Y), RL), goal(is(X, PL), is(Y, QL), plus(PL, QL, RL))); rule(is(minus(X, Y), RL), goal(is(X, PL), is(Y, QL), plus(RL, QL, PL))); rule(is(multiply(X, Y), RL), goal(is(X, PL), is(Y, QL), multiply(PL, QL, RL))); diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 32015e42..0419fd54 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -484,6 +484,12 @@ public FunctImpl functor() { @SuppressWarnings("rawtypes") protected final void makeFact() { + if (functor().lambda() != null) { + throw new IllegalArgumentException("No facts of a functor with a lambda allowed. " + this); + } + if (RULES.get(functor()) != null) { + throw new IllegalArgumentException("No facts of a functor with rules allowed. " + this); + } FACTS.force(this, ADD_FACT, this); Object[] array = toArray(); for (int i = 1; i < array.length; i++) { @@ -1044,11 +1050,36 @@ public static Pred eq(Term a, Term b) { return term(eq, a, b); } - // Facts, Is + // Facts @SuppressWarnings({"unchecked", "rawtypes"}) - public static void fact(Term term) { - Logic. unproxy(term).makeFact(); + public static void fact(Pred pred) { + Logic. unproxy(pred).makeFact(); + } + + // Is + + public static interface Atom extends Term { + + } + + public static interface Func extends Term { + + } + + @SuppressWarnings("rawtypes") + private static Functor is = functor((SerializableBiFunction) Arithmetic::is); + + public static Pred is(T t, Atom a) { + return term(is, t, a); + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + public static void isAtomRule() { + Atom A1 = var(Atom.class, "A1"); + Atom A2 = var(Atom.class, "A2"); + + rule(is(A1, A2), goal(eq(A1, A2))); } // Bindings diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 8cdf2ec2..a62ee7be 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -36,6 +36,8 @@ import org.modelingvalue.dclare.Arithmetic; import org.modelingvalue.dclare.Arithmetic.IntAtom; import org.modelingvalue.dclare.Logic; +import org.modelingvalue.dclare.Logic.Atom; +import org.modelingvalue.dclare.Logic.Func; import org.modelingvalue.dclare.Logic.Functor; import org.modelingvalue.dclare.Logic.Goal; import org.modelingvalue.dclare.Logic.Pred; @@ -90,77 +92,157 @@ static Root rootVar(String name) { static Functor rootPerson = functor(LogicTest::rootPerson); - static Pred rootPerson(Root root, Person person) { + static Pred rootPerson(Root root, PersonAtom person) { return term(rootPerson, root, person); } - // FamilyTree + // Family Tree interface Person extends Term { } - static Functor strPerson = functor((SerializableFunction) LogicTest::person); + interface PersonAtom extends Person, Atom { + } + + interface PersonFunc extends Person, Func { + } - static Person person(String name) { + static Functor strPerson = functor((SerializableFunction) LogicTest::person); + + static PersonAtom person(String name) { return term(strPerson, name); } - static Functor intPerson = functor((SerializableFunction) LogicTest::person); + static Functor intPerson = functor((SerializableFunction) LogicTest::person); - static Person person(IntAtom i) { + static PersonAtom person(IntAtom i) { return term(intPerson, i); } - static Person person(int i) { + static PersonAtom person(int i) { return person(i(i)); } + static PersonAtom personAtomVar(String name) { + return var(PersonAtom.class, name); + } + static Person personVar(String name) { return var(Person.class, name); } static Functor parentChild = functor(LogicTest::parentChild); - static Pred parentChild(Person parent, Person child) { + static Pred parentChild(PersonAtom parent, PersonAtom child) { return term(parentChild, parent, child); } + static Functor parent = functor(LogicTest::parent); + + static PersonFunc parent(Person child) { + return term(parent, child); + } + + static Functor child = functor(LogicTest::child); + + static PersonFunc child(Person parent) { + return term(child, parent); + } + static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); - static Pred ancestorDescendent(Person ancestor, Person descendent) { + static Pred ancestorDescendent(PersonAtom ancestor, PersonAtom descendent) { return term(ancestorDescendent, ancestor, descendent); } + static Functor ancestor = functor(LogicTest::ancestor); + + static PersonFunc ancestor(Person descendent) { + return term(ancestor, descendent); + } + + static Functor descendent = functor(LogicTest::descendent); + + static PersonFunc descendent(Person ancestor) { + return term(descendent, ancestor); + } + // Variables - Root U = rootVar("U"); + Root U = rootVar("U"); + + IntAtom P = ilv("P"); + IntAtom Q = ilv("Q"); - IntAtom P = ilv("P"); - IntAtom Q = ilv("Q"); + PersonAtom A = personAtomVar("A"); + PersonAtom B = personAtomVar("B"); + PersonAtom C = personAtomVar("C"); - Person A = personVar("A"); - Person D = personVar("D"); - Person R = personVar("R"); - Person B = personVar("B"); - Person C = personVar("C"); + Person X = personVar("X"); + Person Y = personVar("Y"); + Person Z = personVar("Z"); // Terms - Person Carel = person("Carel"); - Person Jan = person("Jan"); - Person Elske = person("Elske"); - Person Wim = person("Wim"); - Person Joppe = person("Joppe"); - Person Heleen = person("Heleen"); - Person Marijn = person("Marijn"); + PersonAtom Carel = person("Carel"); + PersonAtom Jan = person("Jan"); + PersonAtom Elske = person("Elske"); + PersonAtom Wim = person("Wim"); + PersonAtom Joppe = person("Joppe"); + PersonAtom Heleen = person("Heleen"); + PersonAtom Marijn = person("Marijn"); + + Root Root = root("Root"); + + // Family Rules - Root Root = root("Root"); + private void familyRules() { + Logic.isAtomRule(); + + rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); + rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); + + rule(is(ancestor(X), A), goal(is(X, B), ancestorDescendent(A, B))); + rule(is(descendent(X), A), goal(is(X, B), ancestorDescendent(B, A))); + + rule(ancestorDescendent(A, C), goal(parentChild(A, C))); + rule(ancestorDescendent(A, C), goal(ancestorDescendent(A, B), parentChild(B, C))); + } + + @RepeatedTest(100) + public void famTest0() { + run(() -> { + familyRules(); + + fact(parentChild(Carel, Jan)); + fact(parentChild(Jan, Wim)); + fact(parentChild(Elske, Wim)); + fact(parentChild(Wim, Joppe)); + fact(parentChild(Heleen, Joppe)); + fact(parentChild(Wim, Marijn)); + fact(parentChild(Heleen, Marijn)); + + isTrue(goal(is(parent(Joppe), Heleen))); + isTrue(goal(is(child(Jan), Wim))); + + isFalse(goal(is(parent(Wim), Marijn))); + isFalse(goal(is(parent(Wim), Heleen))); + isFalse(goal(is(child(Wim), Wim))); + + isTrue(goal(is(descendent(Wim), Marijn))); + isTrue(goal(is(descendent(Carel), Marijn))); + + isFalse(goal(is(descendent(Marijn), Wim))); + isFalse(goal(is(descendent(Heleen), Wim))); + isFalse(goal(is(descendent(Joppe), Carel))); + isFalse(goal(is(descendent(Carel), Carel))); + }); + } @RepeatedTest(100) public void famTest1() { run(() -> { - rule(ancestorDescendent(A, D), goal(parentChild(A, D))); - rule(ancestorDescendent(A, D), goal(ancestorDescendent(A, R), parentChild(R, D))); + familyRules(); fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); @@ -190,18 +272,17 @@ public void famTest1() { @RepeatedTest(100) public void famTest2() { run(() -> { - rule(ancestorDescendent(A, D), goal(parentChild(A, D))); - rule(ancestorDescendent(A, D), goal(ancestorDescendent(A, C), parentChild(C, D))); + familyRules(); - Person Carel = person("Carel"); - Person Jan = person("Jan"); - Person Wim = person("Wim"); + PersonAtom Carel = person("Carel"); + PersonAtom Jan = person("Jan"); + PersonAtom Wim = person("Wim"); fact(parentChild(Carel, Jan)); fact(parentChild(Jan, Wim)); hasBindings(goal(ancestorDescendent(A, Wim)), binding(A, Jan), binding(A, Carel)); - hasBindings(goal(ancestorDescendent(Carel, D)), binding(D, Jan), binding(D, Wim)); + hasBindings(goal(ancestorDescendent(Carel, C)), binding(C, Jan), binding(C, Wim)); }); } @@ -210,8 +291,8 @@ public void famTest3() { run(() -> { rule(parentChild(B, C), goal(parentChild(B, C))); - Person Jan = person("Jan"); - Person Wim = person("Wim"); + PersonAtom Jan = person("Jan"); + PersonAtom Wim = person("Wim"); hasBindings(goal(parentChild(Wim, Jan)), incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))); isIncomplete(goal(parentChild(Wim, Jan))); @@ -225,7 +306,7 @@ public void famTest4() { rule(parentChild(person(Q), person(P)), goal(lt(Q, i(4)), is(plus(Q, i(1)), P))); rule(rootPerson(U, person(0)), goal()); - rule(rootPerson(U, D), goal(rootPerson(U, R), parentChild(R, D))); + rule(rootPerson(U, C), goal(rootPerson(U, A), parentChild(A, C))); isTrue(goal(parentChild(person(0), person(1)))); isTrue(goal(parentChild(person(3), person(4)))); @@ -237,8 +318,8 @@ public void famTest4() { isTrue(goal(rootPerson(Root, person(3)))); isTrue(goal(rootPerson(Root, person(4)))); - hasBindings(goal(rootPerson(Root, D)), binding(D, person(0)), binding(D, person(1)), // - binding(D, person(2)), binding(D, person(3)), binding(D, person(4))); + hasBindings(goal(rootPerson(Root, C)), binding(C, person(0)), binding(C, person(1)), // + binding(C, person(2)), binding(C, person(3)), binding(C, person(4))); }); } From 38d3d06adff28bbe8a80563f994c9e766fc9964e Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:02:52 +0100 Subject: [PATCH 126/179] Facts only allowed for Relations --- src/main/java/org/modelingvalue/dclare/Logic.java | 7 +++++-- .../org/modelingvalue/dclare/test/LogicTest.java | 12 +++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index 0419fd54..aa45c31d 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -415,6 +415,9 @@ public static interface Term { public static interface Pred extends Term { } + public static interface Rel extends Pred { + } + @SuppressWarnings("unchecked") public static F term(Functor functor, Object... args) { return new TermImpl(functor, args).proxy(); @@ -1053,8 +1056,8 @@ public static Pred eq(Term a, Term b) { // Facts @SuppressWarnings({"unchecked", "rawtypes"}) - public static void fact(Pred pred) { - Logic. unproxy(pred).makeFact(); + public static void fact(Rel rel) { + Logic. unproxy(rel).makeFact(); } // Is diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index a62ee7be..f4f17b68 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -36,13 +36,7 @@ import org.modelingvalue.dclare.Arithmetic; import org.modelingvalue.dclare.Arithmetic.IntAtom; import org.modelingvalue.dclare.Logic; -import org.modelingvalue.dclare.Logic.Atom; -import org.modelingvalue.dclare.Logic.Func; -import org.modelingvalue.dclare.Logic.Functor; -import org.modelingvalue.dclare.Logic.Goal; -import org.modelingvalue.dclare.Logic.Pred; -import org.modelingvalue.dclare.Logic.Term; -import org.modelingvalue.dclare.Logic.Variable; +import org.modelingvalue.dclare.Logic.*; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; @@ -131,9 +125,9 @@ static Person personVar(String name) { return var(Person.class, name); } - static Functor parentChild = functor(LogicTest::parentChild); + static Functor parentChild = functor(LogicTest::parentChild); - static Pred parentChild(PersonAtom parent, PersonAtom child) { + static Rel parentChild(PersonAtom parent, PersonAtom child) { return term(parentChild, parent, child); } From f95d1bac843bedb122d9d960172fc8e682370565 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:06:00 +0100 Subject: [PATCH 127/179] improved test --- src/test/java/org/modelingvalue/dclare/test/LogicTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index f4f17b68..5e4a2981 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -223,7 +223,7 @@ public void famTest0() { isFalse(goal(is(parent(Wim), Heleen))); isFalse(goal(is(child(Wim), Wim))); - isTrue(goal(is(descendent(Wim), Marijn))); + isTrue(goal(is(ancestor(Marijn), Wim))); isTrue(goal(is(descendent(Carel), Marijn))); isFalse(goal(is(descendent(Marijn), Wim))); From 6619cc0d3837a176167ce77a2d1196b5b4de28f0 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:34:38 +0100 Subject: [PATCH 128/179] root function --- .../modelingvalue/dclare/test/LogicTest.java | 57 +++++++++++++------ 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 5e4a2981..048aff15 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -74,10 +74,20 @@ static void hasBindings(Goal goal, Map... bindings) { interface Root extends Term { } - static Functor root = functor(LogicTest::root); + interface RootAtom extends Root, Atom { + } + + interface RootFunc extends Root, Func { + } + + static Functor rootAtom = functor((SerializableFunction) LogicTest::root); - static Root root(String name) { - return term(root, name); + static RootAtom root(String name) { + return term(rootAtom, name); + } + + static RootAtom rootAtomVar(String name) { + return var(RootAtom.class, name); } static Root rootVar(String name) { @@ -86,10 +96,16 @@ static Root rootVar(String name) { static Functor rootPerson = functor(LogicTest::rootPerson); - static Pred rootPerson(Root root, PersonAtom person) { + static Pred rootPerson(RootAtom root, PersonAtom person) { return term(rootPerson, root, person); } + static Functor rootFunc = functor((SerializableFunction) LogicTest::root); + + static RootFunc root(Person person) { + return term(rootFunc, person); + } + // Family Tree interface Person extends Term { @@ -163,8 +179,6 @@ static PersonFunc descendent(Person ancestor) { // Variables - Root U = rootVar("U"); - IntAtom P = ilv("P"); IntAtom Q = ilv("Q"); @@ -186,7 +200,17 @@ static PersonFunc descendent(Person ancestor) { PersonAtom Heleen = person("Heleen"); PersonAtom Marijn = person("Marijn"); - Root Root = root("Root"); + RootAtom Root = root("Root"); + + RootAtom U = rootAtomVar("U"); + Root V = rootVar("V"); + + private void rootRules() { + rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); + rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); + + rule(is(root(X), U), goal(is(X, B), rootPerson(U, B))); + } // Family Rules @@ -297,22 +321,23 @@ public void famTest3() { public void famTest4() { run(() -> { Arithmetic.rules(); + rootRules(); rule(parentChild(person(Q), person(P)), goal(lt(Q, i(4)), is(plus(Q, i(1)), P))); rule(rootPerson(U, person(0)), goal()); rule(rootPerson(U, C), goal(rootPerson(U, A), parentChild(A, C))); - isTrue(goal(parentChild(person(0), person(1)))); - isTrue(goal(parentChild(person(3), person(4)))); - isFalse(goal(parentChild(person(4), person(5)))); + isTrue(goal(is(child(person(0)), person(1)))); + isTrue(goal(is(child(person(3)), person(4)))); + isFalse(goal(is(child(person(4)), person(5)))); - isTrue(goal(rootPerson(Root, person(0)))); - isTrue(goal(rootPerson(Root, person(1)))); - isTrue(goal(rootPerson(Root, person(2)))); - isTrue(goal(rootPerson(Root, person(3)))); - isTrue(goal(rootPerson(Root, person(4)))); + isTrue(goal(is(root(person(0)), Root))); + isTrue(goal(is(root(person(1)), Root))); + isTrue(goal(is(root(person(4)), Root))); + isTrue(goal(is(root(person(3)), Root))); + isTrue(goal(is(root(person(2)), Root))); - hasBindings(goal(rootPerson(Root, C)), binding(C, person(0)), binding(C, person(1)), // + hasBindings(goal(is(root(C), Root)), binding(C, person(0)), binding(C, person(1)), // binding(C, person(2)), binding(C, person(3)), binding(C, person(4))); }); } From 771c1ed11aa724e0f6d28dad34963cbcd8a2e057 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:38:21 +0100 Subject: [PATCH 129/179] rule methods rename --- .../org/modelingvalue/dclare/Arithmetic.java | 4 ++-- .../modelingvalue/dclare/test/LogicTest.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java index 5aa72fdf..ca516a3d 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -229,8 +229,8 @@ public static IntFunc sqrt(Int a) { // Is Rules - public static void rules() { - Logic.isAtomRule(); + public static void arithmeticRules() { + isAtomRule(); IntAtom PL = ilv("PL"); IntAtom QL = ilv("QL"); diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 048aff15..0e51757c 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -33,7 +33,6 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.dclare.Arithmetic; import org.modelingvalue.dclare.Arithmetic.IntAtom; import org.modelingvalue.dclare.Logic; import org.modelingvalue.dclare.Logic.*; @@ -206,16 +205,22 @@ static PersonFunc descendent(Person ancestor) { Root V = rootVar("V"); private void rootRules() { + arithmeticRules(); + rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); rule(is(root(X), U), goal(is(X, B), rootPerson(U, B))); + + rule(parentChild(person(Q), person(P)), goal(lt(Q, i(4)), is(plus(Q, i(1)), P))); + rule(rootPerson(U, person(0)), goal()); + rule(rootPerson(U, C), goal(rootPerson(U, A), parentChild(A, C))); } // Family Rules private void familyRules() { - Logic.isAtomRule(); + isAtomRule(); rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); @@ -320,13 +325,8 @@ public void famTest3() { @RepeatedTest(100) public void famTest4() { run(() -> { - Arithmetic.rules(); rootRules(); - rule(parentChild(person(Q), person(P)), goal(lt(Q, i(4)), is(plus(Q, i(1)), P))); - rule(rootPerson(U, person(0)), goal()); - rule(rootPerson(U, C), goal(rootPerson(U, A), parentChild(A, C))); - isTrue(goal(is(child(person(0)), person(1)))); isTrue(goal(is(child(person(3)), person(4)))); isFalse(goal(is(child(person(4)), person(5)))); @@ -345,7 +345,7 @@ public void famTest4() { @RepeatedTest(100) public void intTest() { run(() -> { - Arithmetic.rules(); + arithmeticRules(); hasBindings(goal(plus(i(7), i(3), P)), binding(P, i(10))); hasBindings(goal(plus(i(7), P, i(10))), binding(P, i(3))); @@ -356,7 +356,7 @@ public void intTest() { @RepeatedTest(100) public void isTest() { run(() -> { - Arithmetic.rules(); + arithmeticRules(); isTrue(goal(is(plus(i(11), i(22)), i(33)))); isTrue(goal(is(minus(i(33), i(22)), i(11)))); From f245d754f55455148248c9e576b9f08c33499b07 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:40:10 +0100 Subject: [PATCH 130/179] test cleanup --- src/test/java/org/modelingvalue/dclare/test/LogicTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 0e51757c..5926490d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -189,6 +189,9 @@ static PersonFunc descendent(Person ancestor) { Person Y = personVar("Y"); Person Z = personVar("Z"); + RootAtom U = rootAtomVar("U"); + Root V = rootVar("V"); + // Terms PersonAtom Carel = person("Carel"); @@ -201,8 +204,7 @@ static PersonFunc descendent(Person ancestor) { RootAtom Root = root("Root"); - RootAtom U = rootAtomVar("U"); - Root V = rootVar("V"); + // Root Rules private void rootRules() { arithmeticRules(); From a8cfd3866d2799c5f0e82c394015115fbe129205 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:45:00 +0100 Subject: [PATCH 131/179] literal -> atom --- .../org/modelingvalue/dclare/Arithmetic.java | 36 +++++++++---------- .../modelingvalue/dclare/test/LogicTest.java | 4 +-- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/Arithmetic.java index ca516a3d..0dba8b20 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/Arithmetic.java @@ -50,14 +50,10 @@ public static IntAtom i(long x) { return i(BigInteger.valueOf(x)); } - public static IntAtom ilv(String name) { + public static IntAtom iav(String name) { return var(IntAtom.class, name); } - public static IntFunc ifv(String name) { - return var(IntFunc.class, name); - } - public static Int iv(String name) { return var(Int.class, name); } @@ -232,25 +228,25 @@ public static IntFunc sqrt(Int a) { public static void arithmeticRules() { isAtomRule(); - IntAtom PL = ilv("PL"); - IntAtom QL = ilv("QL"); - IntAtom RL = ilv("RL"); + IntAtom P = iav("PL"); + IntAtom Q = iav("QL"); + IntAtom R = iav("RL"); Int X = iv("X"); Int Y = iv("Y"); - rule(is(plus(X, Y), RL), goal(is(X, PL), is(Y, QL), plus(PL, QL, RL))); - rule(is(minus(X, Y), RL), goal(is(X, PL), is(Y, QL), plus(RL, QL, PL))); - rule(is(multiply(X, Y), RL), goal(is(X, PL), is(Y, QL), multiply(PL, QL, RL))); - rule(is(divide(X, Y), RL), goal(is(X, PL), is(Y, QL), multiply(RL, QL, PL))); - rule(is(power(X), RL), goal(is(X, PL), power(PL, RL))); - rule(is(sqrt(X), RL), goal(is(X, PL), power(RL, PL))); - rule(gt(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(1)))); - rule(lt(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(-1)))); - rule(ge(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(1)))); - rule(ge(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(0)))); - rule(le(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(-1)))); - rule(le(X, Y), goal(is(X, PL), is(Y, QL), compare(PL, QL, i(0)))); + rule(is(plus(X, Y), R), goal(is(X, P), is(Y, Q), plus(P, Q, R))); + rule(is(minus(X, Y), R), goal(is(X, P), is(Y, Q), plus(R, Q, P))); + rule(is(multiply(X, Y), R), goal(is(X, P), is(Y, Q), multiply(P, Q, R))); + rule(is(divide(X, Y), R), goal(is(X, P), is(Y, Q), multiply(R, Q, P))); + rule(is(power(X), R), goal(is(X, P), power(P, R))); + rule(is(sqrt(X), R), goal(is(X, P), power(R, P))); + rule(gt(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(1)))); + rule(lt(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(-1)))); + rule(ge(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(1)))); + rule(ge(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(0)))); + rule(le(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(-1)))); + rule(le(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(0)))); } } diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 5926490d..76a32146 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -178,8 +178,8 @@ static PersonFunc descendent(Person ancestor) { // Variables - IntAtom P = ilv("P"); - IntAtom Q = ilv("Q"); + IntAtom P = iav("P"); + IntAtom Q = iav("Q"); PersonAtom A = personAtomVar("A"); PersonAtom B = personAtomVar("B"); From 58b98bb37d9aa99cf936134b4c6a57567e6e7eb4 Mon Sep 17 00:00:00 2001 From: WimBast Date: Fri, 6 Dec 2024 11:52:17 +0100 Subject: [PATCH 132/179] unique rules --- src/main/java/org/modelingvalue/dclare/Logic.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/Logic.java index aa45c31d..2b7f5b4d 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/Logic.java @@ -56,7 +56,10 @@ public class Logic { } else { int p = e.rulePrio(); for (int i = 0; i < l.size(); i++) { - if (l.get(i).rulePrio() > p) { + RuleImpl r = l.get(i); + if (r.equals(e)) { + return l; + } else if (r.rulePrio() > p) { return l.insert(i, e); } } From e7228356ae023bd8787931a8b3b0a5095939283f Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 9 Dec 2024 09:45:41 +0100 Subject: [PATCH 133/179] collect and separate package --- .../dclare/{ => logic}/Arithmetic.java | 15 +- .../dclare/{ => logic}/Logic.java | 189 +++++++++++++++++- .../modelingvalue/dclare/test/LogicTest.java | 15 +- 3 files changed, 205 insertions(+), 14 deletions(-) rename src/main/java/org/modelingvalue/dclare/{ => logic}/Arithmetic.java (95%) rename src/main/java/org/modelingvalue/dclare/{ => logic}/Logic.java (84%) diff --git a/src/main/java/org/modelingvalue/dclare/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java similarity index 95% rename from src/main/java/org/modelingvalue/dclare/Arithmetic.java rename to src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java index 0dba8b20..3f9cd3b7 100644 --- a/src/main/java/org/modelingvalue/dclare/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java @@ -18,7 +18,9 @@ // but also our friend. "He will live on in many of the lines of code you see below." ~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -package org.modelingvalue.dclare; +package org.modelingvalue.dclare.logic; + +import static org.modelingvalue.dclare.logic.Logic.*; import java.math.BigInteger; @@ -26,8 +28,17 @@ import org.modelingvalue.collections.util.SerializableBiFunction; import org.modelingvalue.collections.util.SerializableFunction; import org.modelingvalue.collections.util.SerializableTriFunction; +import org.modelingvalue.dclare.logic.Logic.Atom; +import org.modelingvalue.dclare.logic.Logic.Func; +import org.modelingvalue.dclare.logic.Logic.Functor; +import org.modelingvalue.dclare.logic.Logic.Pred; +import org.modelingvalue.dclare.logic.Logic.Term; +import org.modelingvalue.dclare.logic.Logic.TermImpl; + +public final class Arithmetic { -public class Arithmetic extends Logic { + private Arithmetic() { + } // Integer diff --git a/src/main/java/org/modelingvalue/dclare/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java similarity index 84% rename from src/main/java/org/modelingvalue/dclare/Logic.java rename to src/main/java/org/modelingvalue/dclare/logic/Logic.java index 2b7f5b4d..d9291a61 100644 --- a/src/main/java/org/modelingvalue/dclare/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -18,13 +18,14 @@ // but also our friend. "He will live on in many of the lines of code you see below." ~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -package org.modelingvalue.dclare; +package org.modelingvalue.dclare.logic; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Objects; import java.util.function.BiFunction; +import java.util.function.Function; import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Entry; @@ -42,8 +43,13 @@ import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; +import org.modelingvalue.dclare.Constant; +import org.modelingvalue.dclare.CoreSetableModifier; -public class Logic { +public final class Logic { + + private Logic() { + } private static final boolean TRACE_LOGIC = Boolean.getBoolean("TRACE_LOGIC"); @@ -305,6 +311,11 @@ protected Class> type() { return (Class>) get(0); } + @SuppressWarnings({"unchecked", "rawtypes"}) + protected List args() { + return (List) get(3); + } + @SuppressWarnings({"unchecked", "rawtypes"}) protected SerializableFunction, Collection> lambda() { return (SerializableFunction, Collection>) get(4); @@ -365,6 +376,34 @@ private static TermImpl list(List es) { return l; } + // Prepend + + @SuppressWarnings("rawtypes") + private static final FunctImpl PREPEND_FUNCTOR = functImpl((SerializableTriFunction) Logic::prepend, t -> { + TermImpl e = t.getTerm(1); + TermImpl i = t.getTerm(2); + TermImpl o = t.getTerm(3); + if (e != null && i != null && o != null) { + return termImpl(LIST_FUNCTOR_2, e, i).equals(o) ? Set.of(t) : Set.of(); + } else if (e != null && i != null && o == null) { + return Set.of(t.set(3, termImpl(LIST_FUNCTOR_2, e, i))); + } else if (e != null && i == null && o != null) { + throw new UnsupportedOperationException("TODO"); + } else if (e == null && i != null && o != null) { + throw new UnsupportedOperationException("TODO"); + } else if (e == null && i == null && o != null) { + throw new UnsupportedOperationException("TODO"); + } else { + return t.incomplete(); + } + }); + @SuppressWarnings("rawtypes") + private static final Functor PREPEND_FUNCTOR_PROXY = PREPEND_FUNCTOR.proxy(); + + public static Pred prepend(E e, L i, L o) { + return term(PREPEND_FUNCTOR_PROXY, e, i, o); + } + // Variables public static interface Variable extends Term { @@ -523,12 +562,12 @@ protected Map getBinding(TermImpl term, Map if (get(0).equals(term.get(0))) { for (int i = 1; i < length(); i++) { Object tv = term.get(i); - Class tt = tv instanceof TermImpl ? ((TermImpl) tv).type() : tv instanceof Class ? (Class) tv : null; + Class tt = typeOf(tv); tv = tv instanceof Class ? null : tv; if (get(i) instanceof VarImpl) { VarImpl var = (VarImpl) get(i); Object vv = vars.get(var); - Class vt = vv instanceof TermImpl ? ((TermImpl) vv).type() : vv instanceof Class ? (Class) vv : null; + Class vt = typeOf(vv); vv = vv instanceof Class ? null : vv; if (vv != null) { if (tv != null && !tv.equals(vv)) { @@ -571,12 +610,20 @@ protected Map getBinding(TermImpl term, Map } } + @SuppressWarnings("rawtypes") + private static Class typeOf(Object v) { + return v instanceof ClauseImpl ? ((ClauseImpl) v).type() : v instanceof Class ? (Class) v : null; + } + @SuppressWarnings({"rawtypes", "unchecked"}) protected TermImpl setBinding(Map vars) { Object[] array = toArray(); for (int i = 1; i < length(); i++) { if (get(i) instanceof VarImpl) { - array[i] = vars.get((VarImpl) get(i)); + Object v = vars.get((VarImpl) get(i)); + if (v != null) { + array[i] = v; + } } else if (get(i) instanceof TermImpl) { array[i] = ((TermImpl) get(i)).setBinding(vars); } @@ -802,6 +849,134 @@ protected boolean isIncomplete() { } }; + // CollectTerm + + public static interface Collect extends Pred { + } + + private static final FunctImpl COLLECT_FUNCTOR = functImpl((SerializableBiFunction) Logic::collect, null); + private static final Functor COLLECT_FUNCTOR_PROXY = COLLECT_FUNCTOR.proxy(); + + @SuppressWarnings("unchecked") + public static Collect collect(Pred pred, Pred accum) { + return new CollectImpl(pred, accum).proxy(); + } + + @SuppressWarnings("rawtypes") + protected static CollectImpl collectImpl(TermImpl pred, TermImpl accum) { + return new CollectImpl(pred, accum); + } + + private static final class CollectImpl extends TermImpl { + private static final long serialVersionUID = -2799691054715131197L; + + private CollectImpl(Pred pred, Pred accum) { + super(COLLECT_FUNCTOR_PROXY, pred, accum); + } + + @SuppressWarnings("rawtypes") + private CollectImpl(TermImpl pred, TermImpl accum) { + super(COLLECT_FUNCTOR, pred, accum); + } + + private CollectImpl(Object[] args) { + super(args); + } + + @Override + @SuppressWarnings("unchecked") + protected Collect proxy() { + return (Collect) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Collect.class}, this); + } + + @Override + @SuppressWarnings({"unchecked", "rawtypes"}) + protected CollectImpl term(Object[] array) { + return new CollectImpl(array); + } + + @SuppressWarnings("rawtypes") + protected final TermImpl pred() { + return ((TermImpl) get(1)); + } + + @SuppressWarnings("rawtypes") + protected final TermImpl accum() { + return ((TermImpl) get(2)); + } + + @SuppressWarnings("rawtypes") + protected Map localVariables() { + Map predVars = pred().variables(); + Map accumVars = accum().variables(); + return predVars.filter(accumVars::contains).asMap(Function.identity()); + } + + @SuppressWarnings("rawtypes") + @Override + protected Map variables() { + Map predVars = pred().variables(); + Map accumVars = accum().variables(); + return Collection.concat(predVars.exclude(accumVars::contains), accumVars.exclude(predVars::contains)).asMap(Function.identity()); + } + + @SuppressWarnings("rawtypes") + private static int identityIndex(TermImpl accum) { + for (int i = 1; i < accum.length(); i++) { + if (accum.get(i) instanceof TermImpl) { + return i; + } + } + return -1; + } + + @SuppressWarnings("rawtypes") + private static int resultIndex(TermImpl accum) { + for (int i = 1; i < accum.length(); i++) { + if (accum.get(i) instanceof Class) { + return i; + } + } + return -1; + } + + @SuppressWarnings({"rawtypes", "unchecked"}) + @Override + protected Collection match(TermImpl goal, List der, Map> rec) { + Map localVars = localVariables(); + TermImpl goalPred = ((CollectImpl) goal).pred(); + TermImpl pred = pred().setBinding(localVars); + TermImpl goalAccum = ((CollectImpl) goal).accum(); + TermImpl accum = accum(); + int ii = identityIndex(accum); + int ri = resultIndex(accum); + Set rs = Set.of(accum.getTerm(ii)); + for (TermImpl m : ((TermImpl) pred).match(goalPred, der, rec)) { + Map b = goalPred.getBinding(m, Map.of()); + Set a = Set.of(); + for (TermImpl r : rs) { + TermImpl s = accum.setBinding(b).set(ii, r); + a = a.addAll(s.match(goalAccum, der, rec)); + } + rs = a.map(t -> t.getTerm(ri)).asSet(); + } + return rs.map(t -> set(2, accum.set(ri, t))); + } + + @SuppressWarnings("rawtypes") + @Override + protected int termPrio(TermImpl goal, List der, Map> rec) { + return super.termPrio(goal, der, rec); + } + + @SuppressWarnings("rawtypes") + @Override + protected Map getBinding(TermImpl term, Map vars) { + Map localVars = localVariables(); + return super.getBinding(term, vars).exclude(e -> localVars.containsKey(e.getKey())).asMap(Function.identity()); + } + } + // Rules public static interface Rule extends Term { @@ -1038,7 +1213,7 @@ public static Incomplete incomplete(L der) { // Equals @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor eq = functor(Arithmetic::eq, t -> { + private static Functor eq = functor(Logic::eq, t -> { TermImpl at = t.getTerm(1); TermImpl bt = t.getTerm(2); if (at == null && bt == null) { @@ -1074,7 +1249,7 @@ public static interface Func extends Term { } @SuppressWarnings("rawtypes") - private static Functor is = functor((SerializableBiFunction) Arithmetic::is); + private static Functor is = functor((SerializableBiFunction) Logic::is); public static Pred is(T t, Atom a) { return term(is, t, a); diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 76a32146..770c8afb 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -22,8 +22,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.modelingvalue.dclare.Arithmetic.*; -import static org.modelingvalue.dclare.Logic.*; +import static org.modelingvalue.dclare.logic.Arithmetic.*; +import static org.modelingvalue.dclare.logic.Logic.*; import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; import java.util.concurrent.ThreadLocalRandom; @@ -33,11 +33,11 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.dclare.Arithmetic.IntAtom; -import org.modelingvalue.dclare.Logic; -import org.modelingvalue.dclare.Logic.*; import org.modelingvalue.dclare.Universe; import org.modelingvalue.dclare.UniverseTransaction; +import org.modelingvalue.dclare.logic.Arithmetic.IntAtom; +import org.modelingvalue.dclare.logic.Logic; +import org.modelingvalue.dclare.logic.Logic.*; public class LogicTest { @@ -192,6 +192,9 @@ static PersonFunc descendent(Person ancestor) { RootAtom U = rootAtomVar("U"); Root V = rootVar("V"); + @SuppressWarnings("unchecked") + L PL = var(L.class, "PL"); + // Terms PersonAtom Carel = person("Carel"); @@ -291,6 +294,8 @@ public void famTest1() { isFalse(goal(ancestorDescendent(Heleen, Wim))); isFalse(goal(ancestorDescendent(Joppe, Carel))); isFalse(goal(ancestorDescendent(Carel, Carel))); + + hasBindings(goal(collect(parentChild(Wim, C), prepend(C, l(), PL))), binding(PL, l(Marijn, Joppe))); }); } From f28f788cb421a67b59cdb8282ab2fdac3ac52f00 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 9 Dec 2024 11:33:39 +0100 Subject: [PATCH 134/179] more add functionality on L --- .../org/modelingvalue/dclare/logic/Logic.java | 173 +++++++++++++----- .../modelingvalue/dclare/test/LogicTest.java | 2 +- 2 files changed, 124 insertions(+), 51 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index d9291a61..630ec370 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -43,6 +43,7 @@ import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; +import org.modelingvalue.collections.util.StringUtil; import org.modelingvalue.dclare.Constant; import org.modelingvalue.dclare.CoreSetableModifier; @@ -78,7 +79,7 @@ private Logic() { @SuppressWarnings("rawtypes") private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); - private static abstract class ClauseImpl extends StructImpl implements InvocationHandler { + private static abstract class ClauseImpl extends StructImpl implements InvocationHandler, Comparable> { private static final long serialVersionUID = 7315776001191198132L; private static final Method EQUALS; @@ -156,6 +157,33 @@ private static final Object[] unproxy(Functor functor, Object[] args) { protected abstract Class type(); protected abstract ClauseImpl term(Object[] array); + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public int compareTo(ClauseImpl o) { + int r = length() - o.length(); + if (r != 0) { + return r; + } + for (int i = 0; i < length(); i++) { + Object tv = get(i); + Object ov = o.get(i); + if (tv instanceof Comparable && tv.getClass().equals(ov.getClass())) { + r = ((Comparable) tv).compareTo(ov); + if (r != 0) { + break; + } + } else { + String ts = StringUtil.toString(tv); + String os = StringUtil.toString(ov); + r = ts.compareTo(os); + if (r != 0) { + break; + } + } + } + return r; + } } private static final Object noProxy(Object object) { @@ -378,30 +406,52 @@ private static TermImpl list(List es) { // Prepend + @SuppressWarnings({"unchecked", "rawtypes"}) + private static List addOrdered(List l, TermImpl e) { + for (int i = 0; i < l.size(); i++) { + if (l.get(i).compareTo(e) > 0) { + return l.insert(i, e); + } + } + return l.append(e); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static Set> remove(List l, TermImpl e) { + Set> ls = Set.of(); + for (int i = l.firstIndexOf(e); i >= 0; i = l.firstIndexOf(i, l.size(), e)) { + ls = ls.add(l.removeIndex(i)); + } + return ls; + } + @SuppressWarnings("rawtypes") - private static final FunctImpl PREPEND_FUNCTOR = functImpl((SerializableTriFunction) Logic::prepend, t -> { - TermImpl e = t.getTerm(1); - TermImpl i = t.getTerm(2); - TermImpl o = t.getTerm(3); - if (e != null && i != null && o != null) { - return termImpl(LIST_FUNCTOR_2, e, i).equals(o) ? Set.of(t) : Set.of(); - } else if (e != null && i != null && o == null) { - return Set.of(t.set(3, termImpl(LIST_FUNCTOR_2, e, i))); - } else if (e != null && i == null && o != null) { - throw new UnsupportedOperationException("TODO"); - } else if (e == null && i != null && o != null) { - throw new UnsupportedOperationException("TODO"); - } else if (e == null && i == null && o != null) { - throw new UnsupportedOperationException("TODO"); - } else { - return t.incomplete(); + private static final FunctImpl ADD_FUNCTOR = functImpl((SerializableTriFunction) Logic::add, t -> { + TermImpl e = t.getTerm(1); + TermImpl i = t.getTerm(2); + TermImpl o = t.getTerm(3); + List il = i != null ? i.list() : null; + List ol = o != null ? o.list() : null; + if (e != null && il != null && ol != null) { + return addOrdered(il, e).equals(ol) ? Set.of(t) : Set.of(); + } else if (e != null && il != null && ol == null) { + return Set.of(t.set(3, list(addOrdered(il, e)))); + } else if (e != null && il == null && ol != null) { + return remove(ol, e).map(r -> (TermImpl) t.set(2, r)).asSet(); + } else if (e == null && il != null && ol != null) { + if (il.anyMatch(ol::notContains)) { + return Set.of(); } - }); + return ol.removeAll(il).map(r -> (TermImpl) t.set(1, r)).asSet(); + } else { + return t.incomplete(); + } + }); @SuppressWarnings("rawtypes") - private static final Functor PREPEND_FUNCTOR_PROXY = PREPEND_FUNCTOR.proxy(); + private static final Functor ADD_FUNCTOR_PROXY = ADD_FUNCTOR.proxy(); - public static Pred prepend(E e, L i, L o) { - return term(PREPEND_FUNCTOR_PROXY, e, i, o); + public static Pred add(E e, L i, L o) { + return term(ADD_FUNCTOR_PROXY, e, i, o); } // Variables @@ -662,14 +712,14 @@ public Set incomplete() { @SuppressWarnings({"rawtypes", "unchecked"}) protected Collection match(TermImpl goal, List der, Map> rec) { - int non = nrOfNulls(); - if (non > 1 || non >= totalLength()) { - return Set.of(Logic.incomplete(der.append(this))); - } SerializableFunction, Collection> lambda = functor().lambda(); if (lambda != null) { return lambda.apply(this); } + int non = nrOfNulls(); + if (non > 1 || non >= totalLength()) { + return Set.of(Logic.incomplete(der.append(this))); + } Set facts = FACTS.get(this); if (facts != null) { return facts; @@ -708,9 +758,6 @@ protected Collection match(TermImpl goal, List der, Map der, Map> rec) { int non = nrOfNulls(); - if (non > 1 || non >= totalLength()) { - return Integer.MAX_VALUE; - } SerializableFunction, Collection> lambda = functor().lambda(); if (lambda != null) { Collection result = lambda.apply(this); @@ -718,7 +765,10 @@ protected int termPrio(TermImpl goal, List der, Map set = (Set) result; return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); } - return non; + return non - nrOfBindings(goal); + } + if (non > 1 || non >= totalLength()) { + return Integer.MAX_VALUE; } Set facts = FACTS.get(this); if (facts != null) { @@ -905,53 +955,76 @@ protected final TermImpl accum() { return ((TermImpl) get(2)); } + @SuppressWarnings("rawtypes") + private Map localVariables; + @SuppressWarnings("rawtypes") protected Map localVariables() { - Map predVars = pred().variables(); - Map accumVars = accum().variables(); - return predVars.filter(accumVars::contains).asMap(Function.identity()); + if (localVariables == null) { + Map predVars = pred().variables(); + Map accumVars = accum().variables(); + localVariables = predVars.filter(accumVars::contains).asMap(Function.identity()); + } + return localVariables; } + @SuppressWarnings("rawtypes") + private Map variables; + @SuppressWarnings("rawtypes") @Override protected Map variables() { - Map predVars = pred().variables(); - Map accumVars = accum().variables(); - return Collection.concat(predVars.exclude(accumVars::contains), accumVars.exclude(predVars::contains)).asMap(Function.identity()); + if (variables == null) { + Map predVars = pred().variables(); + Map accumVars = accum().variables(); + variables = Collection.concat(predVars.exclude(accumVars::contains), accumVars.exclude(predVars::contains)).asMap(Function.identity()); + } + return variables; } + private int identityIndex = -1; + @SuppressWarnings("rawtypes") - private static int identityIndex(TermImpl accum) { - for (int i = 1; i < accum.length(); i++) { - if (accum.get(i) instanceof TermImpl) { - return i; + private int identityIndex() { + if (identityIndex < 0) { + TermImpl accum = accum(); + for (int i = 1; i < accum.length(); i++) { + if (accum.get(i) instanceof TermImpl) { + identityIndex = i; + break; + } } } - return -1; + return identityIndex; } + private int resultIndex = -1; + @SuppressWarnings("rawtypes") - private static int resultIndex(TermImpl accum) { - for (int i = 1; i < accum.length(); i++) { - if (accum.get(i) instanceof Class) { - return i; + private int resultIndex() { + if (resultIndex < 0) { + TermImpl accum = accum(); + for (int i = 1; i < accum.length(); i++) { + if (accum.get(i) instanceof VarImpl && !localVariables().containsKey((VarImpl) accum.get(i))) { + resultIndex = i; + break; + } } } - return -1; + return resultIndex; } @SuppressWarnings({"rawtypes", "unchecked"}) @Override protected Collection match(TermImpl goal, List der, Map> rec) { - Map localVars = localVariables(); + Map localVars = ((CollectImpl) goal).localVariables(); + int ii = ((CollectImpl) goal).identityIndex(); + int ri = ((CollectImpl) goal).resultIndex(); TermImpl goalPred = ((CollectImpl) goal).pred(); - TermImpl pred = pred().setBinding(localVars); TermImpl goalAccum = ((CollectImpl) goal).accum(); TermImpl accum = accum(); - int ii = identityIndex(accum); - int ri = resultIndex(accum); Set rs = Set.of(accum.getTerm(ii)); - for (TermImpl m : ((TermImpl) pred).match(goalPred, der, rec)) { + for (TermImpl m : ((TermImpl) pred().setBinding(localVars)).match(goalPred, der, rec)) { Map b = goalPred.getBinding(m, Map.of()); Set a = Set.of(); for (TermImpl r : rs) { diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 770c8afb..8b350933 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -295,7 +295,7 @@ public void famTest1() { isFalse(goal(ancestorDescendent(Joppe, Carel))); isFalse(goal(ancestorDescendent(Carel, Carel))); - hasBindings(goal(collect(parentChild(Wim, C), prepend(C, l(), PL))), binding(PL, l(Marijn, Joppe))); + hasBindings(goal(collect(parentChild(Wim, C), add(C, l(), PL))), binding(PL, l(Joppe, Marijn))); }); } From 87026291d09cfcfc069817abeafb3cae9a425a07 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 9 Dec 2024 13:29:49 +0100 Subject: [PATCH 135/179] incomplete handing in collect --- .../org/modelingvalue/dclare/logic/Logic.java | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 630ec370..0907d7ee 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -707,7 +707,7 @@ public TermImpl set(int i, Object v) { @SuppressWarnings({"rawtypes", "unchecked"}) public Set incomplete() { - return Set.of(Logic.incomplete(Logic.list(this))); + return Set.of(Logic.incomplete(List.of(this))); } @SuppressWarnings({"rawtypes", "unchecked"}) @@ -732,7 +732,7 @@ protected Collection match(TermImpl goal, List der, Map= 0) { - return Set.of(Logic.incomplete(der.sublist(i, der.size()).append(this))); + return Set.of(Logic.incomplete(der.append(this))); } der = der.append(this); Set set = Set.of(), add = Set.of(); @@ -1024,16 +1024,27 @@ protected Collection match(TermImpl goal, List der, Map rs = Set.of(accum.getTerm(ii)); - for (TermImpl m : ((TermImpl) pred().setBinding(localVars)).match(goalPred, der, rec)) { - Map b = goalPred.getBinding(m, Map.of()); - Set a = Set.of(); - for (TermImpl r : rs) { - TermImpl s = accum.setBinding(b).set(ii, r); - a = a.addAll(s.match(goalAccum, der, rec)); + Set inc = Set.of(); + for (TermImpl pm : ((TermImpl) pred().setBinding(localVars)).match(goalPred, der, rec)) { + if (pm.isIncomplete()) { + inc = inc.add(pm); + } else { + Map b = goalPred.getBinding(pm, Map.of()); + Set a = Set.of(); + for (TermImpl r : rs) { + TermImpl s = accum.setBinding(b).set(ii, r); + for (TermImpl am : ((TermImpl) s).match(goalAccum, der, rec)) { + if (am.isIncomplete()) { + inc = inc.add(am); + } else { + a = a.add(am); + } + } + } + rs = a.map(t -> t.getTerm(ri)).asSet(); } - rs = a.map(t -> t.getTerm(ri)).asSet(); } - return rs.map(t -> set(2, accum.set(ri, t))); + return Collection.concat(inc, rs.map(t -> set(2, accum.set(ri, t)))); } @SuppressWarnings("rawtypes") From ae1586a86284d0fa4c6c591f9a7bed0a7adef0fe Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 9 Dec 2024 15:40:28 +0100 Subject: [PATCH 136/179] sum --- src/test/java/org/modelingvalue/dclare/test/LogicTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 8b350933..6697914c 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -381,6 +381,8 @@ public void isTest() { hasBindings(goal(is(plus(P, i(3)), i(10))), binding(P, i(7))); hasBindings(goal(is(sqrt(i(49)), P)), binding(P, i(7)), binding(P, i(-7))); + + hasBindings(goal(collect(is(sqrt(i(49)), P), plus(P, i(0), Q))), binding(Q, i(0))); }); } From 5c026fb9c41476dc1b4a2317d2318568853180c0 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 07:09:16 +0100 Subject: [PATCH 137/179] symmetric is --- src/main/java/org/modelingvalue/dclare/logic/Logic.java | 8 ++++++-- .../java/org/modelingvalue/dclare/test/LogicTest.java | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 0907d7ee..9a15ac18 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -1335,16 +1335,20 @@ public static interface Func extends Term { @SuppressWarnings("rawtypes") private static Functor is = functor((SerializableBiFunction) Logic::is); - public static Pred is(T t, Atom a) { - return term(is, t, a); + public static Pred is(T a, T b) { + return term(is, a, b); } @SuppressWarnings({"rawtypes", "unchecked"}) public static void isAtomRule() { Atom A1 = var(Atom.class, "A1"); Atom A2 = var(Atom.class, "A2"); + Func F1 = var(Func.class, "F1"); + Func F2 = var(Func.class, "F2"); rule(is(A1, A2), goal(eq(A1, A2))); + rule(is(F1, F2), goal(is(F2, A2), is(F1, A2))); + rule(is(A1, F1), goal(is(F1, A1))); } // Bindings diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 6697914c..f945822e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -251,9 +251,9 @@ public void famTest0() { fact(parentChild(Heleen, Marijn)); isTrue(goal(is(parent(Joppe), Heleen))); - isTrue(goal(is(child(Jan), Wim))); + isTrue(goal(is(Wim, child(Jan)))); - isFalse(goal(is(parent(Wim), Marijn))); + isFalse(goal(is(Marijn, parent(Wim)))); isFalse(goal(is(parent(Wim), Heleen))); isFalse(goal(is(child(Wim), Wim))); From 64d9906b4f428df2c02ae2101cc0e82f29b339ea Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 07:47:32 +0100 Subject: [PATCH 138/179] deep eq --- .../dclare/logic/Arithmetic.java | 2 +- .../org/modelingvalue/dclare/logic/Logic.java | 57 ++++++++++++++++++- .../modelingvalue/dclare/test/LogicTest.java | 2 +- 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java b/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java index 3f9cd3b7..f72cac4b 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java @@ -237,7 +237,7 @@ public static IntFunc sqrt(Int a) { // Is Rules public static void arithmeticRules() { - isAtomRule(); + isRules(); IntAtom P = iav("PL"); IntAtom Q = iav("QL"); diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 9a15ac18..4e0c652a 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -184,6 +184,52 @@ public int compareTo(ClauseImpl o) { } return r; } + + @SuppressWarnings({"rawtypes", "unchecked"}) + protected ClauseImpl eq(ClauseImpl other) { + Object[] array = toArray(); + for (int i = 0; i < array.length; i++) { + Object tv = get(i); + Object ov = other.get(i); + if (tv != ov) { + if (tv instanceof ClauseImpl && ov instanceof ClauseImpl) { + ClauseImpl eq = ((ClauseImpl) tv).eq((ClauseImpl) ov); + if (eq != null) { + array[i] = eq; + } else { + return null; + } + } else if (tv instanceof ClauseImpl && ov instanceof Class) { + if (((Class) ov).isAssignableFrom(((ClauseImpl) tv).type())) { + array[i] = tv; + } else { + return null; + } + } else if (tv instanceof Class && ov instanceof ClauseImpl) { + if (((Class) tv).isAssignableFrom(((ClauseImpl) ov).type())) { + array[i] = ov; + } else { + return null; + } + } else if (!(tv instanceof Class) && ov instanceof Class) { + if (((Class) ov).isAssignableFrom(tv.getClass())) { + array[i] = tv; + } else { + return null; + } + } else if (tv instanceof Class && !(ov instanceof Class)) { + if (((Class) tv).isAssignableFrom(ov.getClass())) { + array[i] = ov; + } else { + return null; + } + } else if (!Objects.equals(tv, ov)) { + return null; + } + } + } + return term(array); + } } private static final Object noProxy(Object object) { @@ -897,6 +943,12 @@ protected boolean isIncomplete(TermImpl other) { protected boolean isIncomplete() { return functor() == INCOMPLETE_FUNCTOR; } + + @Override + @SuppressWarnings({"rawtypes", "unchecked"}) + protected TermImpl eq(ClauseImpl other) { + return (TermImpl) super.eq(other); + } }; // CollectTerm @@ -1307,7 +1359,8 @@ public static Incomplete incomplete(L der) { } else if (bt == null) { return Set.of(t.set(2, at)); } else { - return at.equals(bt) ? Set.of(t) : Set.of(); + TermImpl eq = at.eq(bt); + return eq == null ? Set.of() : Set.of(t.set(1, eq).set(2, eq)); } }); @@ -1340,7 +1393,7 @@ public static Pred is(T a, T b) { } @SuppressWarnings({"rawtypes", "unchecked"}) - public static void isAtomRule() { + public static void isRules() { Atom A1 = var(Atom.class, "A1"); Atom A2 = var(Atom.class, "A2"); Func F1 = var(Func.class, "F1"); diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index f945822e..08486ad1 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -225,7 +225,7 @@ private void rootRules() { // Family Rules private void familyRules() { - isAtomRule(); + isRules(); rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); From c8dfb162777c053f8291d34742b7316b6e2c8a8e Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 07:50:18 +0100 Subject: [PATCH 139/179] eq using == --- src/main/java/org/modelingvalue/dclare/logic/Logic.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 4e0c652a..6e3b9d00 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -187,6 +187,9 @@ public int compareTo(ClauseImpl o) { @SuppressWarnings({"rawtypes", "unchecked"}) protected ClauseImpl eq(ClauseImpl other) { + if (this == other) { + return this; + } Object[] array = toArray(); for (int i = 0; i < array.length; i++) { Object tv = get(i); From 9c98d1921ef01f538abe4317f204e3bfcd07e26a Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 08:05:24 +0100 Subject: [PATCH 140/179] more precise identity index resolvement --- src/main/java/org/modelingvalue/dclare/logic/Logic.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 6e3b9d00..53fe5d0a 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -1045,8 +1045,12 @@ private int identityIndex() { TermImpl accum = accum(); for (int i = 1; i < accum.length(); i++) { if (accum.get(i) instanceof TermImpl) { - identityIndex = i; - break; + Class rt = ((VarImpl) accum.get(resultIndex())).type(); + Class at = ((TermImpl) accum.get(i)).type(); + if (rt.isAssignableFrom(at)) { + identityIndex = i; + break; + } } } } From 9d6c3fa59c6ab16885d3349177e7291e2691a438 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 08:15:36 +0100 Subject: [PATCH 141/179] simplified collect --- .../org/modelingvalue/dclare/logic/Logic.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 53fe5d0a..30e8f9f9 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -453,7 +453,7 @@ private static TermImpl list(List es) { return l; } - // Prepend + // Add @SuppressWarnings({"unchecked", "rawtypes"}) private static List addOrdered(List l, TermImpl e) { @@ -954,16 +954,13 @@ protected TermImpl eq(ClauseImpl other) { } }; - // CollectTerm + // Collect - public static interface Collect extends Pred { - } - - private static final FunctImpl COLLECT_FUNCTOR = functImpl((SerializableBiFunction) Logic::collect, null); - private static final Functor COLLECT_FUNCTOR_PROXY = COLLECT_FUNCTOR.proxy(); + private static final FunctImpl COLLECT_FUNCTOR = functImpl((SerializableBiFunction) Logic::collect, null); + private static final Functor COLLECT_FUNCTOR_PROXY = COLLECT_FUNCTOR.proxy(); @SuppressWarnings("unchecked") - public static Collect collect(Pred pred, Pred accum) { + public static Pred collect(Pred pred, Pred accum) { return new CollectImpl(pred, accum).proxy(); } @@ -972,7 +969,7 @@ protected static CollectImpl collectImpl(TermImpl pred, TermImpl accum) { return new CollectImpl(pred, accum); } - private static final class CollectImpl extends TermImpl { + private static final class CollectImpl extends TermImpl { private static final long serialVersionUID = -2799691054715131197L; private CollectImpl(Pred pred, Pred accum) { @@ -990,8 +987,8 @@ private CollectImpl(Object[] args) { @Override @SuppressWarnings("unchecked") - protected Collect proxy() { - return (Collect) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Collect.class}, this); + protected Pred proxy() { + return (Pred) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Pred.class}, this); } @Override @@ -1114,7 +1111,7 @@ protected int termPrio(TermImpl goal, List der, Map getBinding(TermImpl term, Map vars) { + protected Map getBinding(TermImpl term, Map vars) { Map localVars = localVariables(); return super.getBinding(term, vars).exclude(e -> localVars.containsKey(e.getKey())).asMap(Function.identity()); } From ee8c035c6bd1be748d769bec48733c53733bc787 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 09:12:58 +0100 Subject: [PATCH 142/179] make Logic independent of DClare --- .../org/modelingvalue/dclare/logic/Logic.java | 99 +++++++++++-------- .../modelingvalue/dclare/test/LogicTest.java | 12 +-- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/dclare/logic/Logic.java index 30e8f9f9..ec85cae2 100644 --- a/src/main/java/org/modelingvalue/dclare/logic/Logic.java +++ b/src/main/java/org/modelingvalue/dclare/logic/Logic.java @@ -24,6 +24,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiFunction; import java.util.function.Function; @@ -33,6 +34,7 @@ import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.struct.impl.StructImpl; +import org.modelingvalue.collections.util.Context; import org.modelingvalue.collections.util.SerializableBiFunction; import org.modelingvalue.collections.util.SerializableBiFunction.SerializableBiFunctionImpl; import org.modelingvalue.collections.util.SerializableFunction; @@ -44,14 +46,24 @@ import org.modelingvalue.collections.util.SerializableTriFunction; import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; import org.modelingvalue.collections.util.StringUtil; -import org.modelingvalue.dclare.Constant; -import org.modelingvalue.dclare.CoreSetableModifier; public final class Logic { private Logic() { } + private static final Context DATABASE = Context.of(); + + public static final void run(Runnable runnable) { + DATABASE.run(new Database(), runnable); + } + + @SuppressWarnings("rawtypes") + private static final class Database { + private final AtomicReference>> facts = new AtomicReference<>(Map.of()); + private final AtomicReference>> rules = new AtomicReference<>(Map.of()); + } + private static final boolean TRACE_LOGIC = Boolean.getBoolean("TRACE_LOGIC"); @SuppressWarnings("rawtypes") @@ -73,11 +85,6 @@ private Logic() { return l.append(e); } }; - @SuppressWarnings("rawtypes") - private static final Constant> FACTS = Constant.of("FACTS", null, CoreSetableModifier.durable); - - @SuppressWarnings("rawtypes") - private static final Constant> RULES = Constant.of("RULES", null, CoreSetableModifier.durable); private static abstract class ClauseImpl extends StructImpl implements InvocationHandler, Comparable> { private static final long serialVersionUID = 7315776001191198132L; @@ -627,18 +634,19 @@ public FunctImpl functor() { } @SuppressWarnings("rawtypes") - protected final void makeFact() { + protected final void makeFact(Database database) { if (functor().lambda() != null) { throw new IllegalArgumentException("No facts of a functor with a lambda allowed. " + this); } - if (RULES.get(functor()) != null) { + if (database.rules.get().get(functor()) != null) { throw new IllegalArgumentException("No facts of a functor with rules allowed. " + this); } - FACTS.force(this, ADD_FACT, this); + database.facts.updateAndGet(m -> m.put(this, ADD_FACT.apply(m.get(this), this))); Object[] array = toArray(); for (int i = 1; i < array.length; i++) { array[i] = getType(i); - FACTS.force(term(array), ADD_FACT, this); + TermImpl term = term(array); + database.facts.updateAndGet(m -> m.put(term, ADD_FACT.apply(m.get(term), this))); array = toArray(); } } @@ -760,7 +768,7 @@ public Set incomplete() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection match(TermImpl goal, List der, Map> rec) { + protected Collection match(TermImpl goal, List der, Map> rec, Database database) { SerializableFunction, Collection> lambda = functor().lambda(); if (lambda != null) { return lambda.apply(this); @@ -769,11 +777,11 @@ protected Collection match(TermImpl goal, List der, Map 1 || non >= totalLength()) { return Set.of(Logic.incomplete(der.append(this))); } - Set facts = FACTS.get(this); + Set facts = database.facts.get().get(this); if (facts != null) { return facts; } - List rules = RULES.get(functor()); + List rules = database.rules.get().get(functor()); if (rules != null) { Set r = rec.get(this); if (r != null) { @@ -787,7 +795,7 @@ protected Collection match(TermImpl goal, List der, Map set = Set.of(), add = Set.of(); boolean found = false, incomplete = false; do { - add = or(rules, non, der, add.isEmpty() ? rec : rec.put(this, add)).removeAll(set); + add = or(rules, non, der, add.isEmpty() ? rec : rec.put(this, add), database).removeAll(set); found = add.anyMatch(this::equalFunctor); incomplete |= add.anyMatch(this::isIncomplete); if (incomplete && found && set.isEmpty()) { @@ -795,17 +803,22 @@ protected Collection match(TermImpl goal, List der, Map der, Map> rec) { + private void memoization(Set set, Database database) { + database.facts.updateAndGet(m -> m.put(this, set)); + for (TermImpl e : set) { + database.facts.updateAndGet(m -> m.put(e, Set.of(e))); + } + } + + @SuppressWarnings("rawtypes") + protected int termPrio(TermImpl goal, List der, Map> rec, Database database) { int non = nrOfNulls(); SerializableFunction, Collection> lambda = functor().lambda(); if (lambda != null) { @@ -819,11 +832,11 @@ protected int termPrio(TermImpl goal, List der, Map 1 || non >= totalLength()) { return Integer.MAX_VALUE; } - Set facts = FACTS.get(this); + Set facts = database.facts.get().get(this); if (facts != null) { return Integer.MIN_VALUE + facts.size(); } - List rules = RULES.get(functor()); + List rules = database.rules.get().get(functor()); if (rules != null) { Set r = rec.get(this); if (r != null) { @@ -841,10 +854,10 @@ protected int termPrio(TermImpl goal, List der, Map or(List rules, int non, List der, Map> rec) { + private Set or(List rules, int non, List der, Map> rec, Database database) { Set r = Set.of(); for (RuleImpl rule : rules) { - Set eval = rule.eval(this, der, rec); + Set eval = rule.eval(this, der, rec, database); if (non == 0 && eval.equals(Set.of(this))) { return (Set) eval; } @@ -1072,7 +1085,7 @@ private int resultIndex() { @SuppressWarnings({"rawtypes", "unchecked"}) @Override - protected Collection match(TermImpl goal, List der, Map> rec) { + protected Collection match(TermImpl goal, List der, Map> rec, Database database) { Map localVars = ((CollectImpl) goal).localVariables(); int ii = ((CollectImpl) goal).identityIndex(); int ri = ((CollectImpl) goal).resultIndex(); @@ -1081,7 +1094,7 @@ protected Collection match(TermImpl goal, List der, Map rs = Set.of(accum.getTerm(ii)); Set inc = Set.of(); - for (TermImpl pm : ((TermImpl) pred().setBinding(localVars)).match(goalPred, der, rec)) { + for (TermImpl pm : ((TermImpl) pred().setBinding(localVars)).match(goalPred, der, rec, database)) { if (pm.isIncomplete()) { inc = inc.add(pm); } else { @@ -1089,7 +1102,7 @@ protected Collection match(TermImpl goal, List der, Map a = Set.of(); for (TermImpl r : rs) { TermImpl s = accum.setBinding(b).set(ii, r); - for (TermImpl am : ((TermImpl) s).match(goalAccum, der, rec)) { + for (TermImpl am : ((TermImpl) s).match(goalAccum, der, rec, database)) { if (am.isIncomplete()) { inc = inc.add(am); } else { @@ -1105,8 +1118,8 @@ protected Collection match(TermImpl goal, List der, Map der, Map> rec) { - return super.termPrio(goal, der, rec); + protected int termPrio(TermImpl goal, List der, Map> rec, Database database) { + return super.termPrio(goal, der, rec, database); } @SuppressWarnings("rawtypes") @@ -1129,7 +1142,9 @@ public static interface Rule extends Term { public static Rule rule(Pred pred, Goal goal) { RuleImpl ruleImpl = new RuleImpl(pred, goal); TermImpl termImpl = Logic. unproxy(pred); - RULES.force(termImpl.functor(), ADD_RULE, ruleImpl); + FunctImpl functor = termImpl.functor(); + Database database = DATABASE.get(); + database.rules.updateAndGet(m -> m.put(functor, ADD_RULE.apply(m.get(functor), ruleImpl))); return ruleImpl.proxy(); } @@ -1166,7 +1181,7 @@ protected final GoalImpl goal() { } @SuppressWarnings({"rawtypes", "unchecked"}) - protected Set eval(TermImpl term, List der, Map> rec) { + protected Set eval(TermImpl term, List der, Map> rec, Database database) { TermImpl head = term(); Map binding = head.getBinding(term, Map.of()); if (binding == null) { @@ -1175,7 +1190,7 @@ protected Set eval(TermImpl term, List der, Map> r = goal().eval(variables().putAll(binding), der, rec); + Collection> r = goal().eval(variables().putAll(binding), der, rec, database); return r.map(m -> { TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); return it != null ? it : head.setBinding(m); @@ -1263,12 +1278,12 @@ protected GoalImpl term(Object[] array) { @SuppressWarnings("rawtypes") public Collection> eval() { - return eval(variables(), List.of(), Map.of()); + return eval(variables(), List.of(), Map.of(), DATABASE.get()); } @SuppressWarnings("rawtypes") - protected Collection> eval(Map vars, List der, Map> rec) { - return eval(goals(), Set.of(vars), der, rec); + protected Collection> eval(Map vars, List der, Map> rec, Database database) { + return eval(goals(), Set.of(vars), der, rec, database); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -1277,7 +1292,7 @@ protected List goals() { } @SuppressWarnings({"rawtypes", "unchecked"}) - private Collection> eval(List goals, Collection> vars, List der, Map> rec) { + private Collection> eval(List goals, Collection> vars, List der, Map> rec, Database database) { if (goals.isEmpty()) { return vars; } @@ -1289,10 +1304,10 @@ private Collection> eval(List goals, Collection m = f.match(g, der, rec); + Collection m = f.match(g, der, rec, database); return eval(goals.removeIndex(i), m.> map(t -> { if (t.type() == Incomplete.class) { return Map.of(Entry.of(INCOMPLETE_VAR, t)); @@ -1300,16 +1315,16 @@ private Collection> eval(List goals, Collection b = g.getBinding(t, Map.of()); return b == null ? Map.of() : v.putAll(b); } - }), der, rec); + }), der, rec, database); }); } @SuppressWarnings({"rawtypes", "unchecked"}) - private static int first(List actual, List goals, List der, Map> rec) { + private static int first(List actual, List goals, List der, Map> rec, Database database) { int first = -1; int min = Integer.MAX_VALUE; for (int i = 0; i < actual.size(); i++) { - int prio = actual.get(i).termPrio(goals.get(i), der, rec); + int prio = actual.get(i).termPrio(goals.get(i), der, rec, database); if (first == -1 || prio < min) { first = i; min = prio; @@ -1376,7 +1391,7 @@ public static Pred eq(Term a, Term b) { @SuppressWarnings({"unchecked", "rawtypes"}) public static void fact(Rel rel) { - Logic. unproxy(rel).makeFact(); + Logic. unproxy(rel).makeFact(DATABASE.get()); } // Is diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java index 08486ad1..73215fdc 100644 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java @@ -24,17 +24,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.modelingvalue.dclare.logic.Arithmetic.*; import static org.modelingvalue.dclare.logic.Logic.*; -import static org.modelingvalue.dclare.test.support.Shared.THE_POOL; - -import java.util.concurrent.ThreadLocalRandom; import org.junit.jupiter.api.RepeatedTest; -import org.modelingvalue.collections.Collection; import org.modelingvalue.collections.Map; import org.modelingvalue.collections.Set; import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.dclare.Universe; -import org.modelingvalue.dclare.UniverseTransaction; import org.modelingvalue.dclare.logic.Arithmetic.IntAtom; import org.modelingvalue.dclare.logic.Logic; import org.modelingvalue.dclare.logic.Logic.*; @@ -44,11 +38,7 @@ public class LogicTest { // Utilities void run(Runnable test) { - UniverseTransaction universeTransaction = new UniverseTransaction(Universe.of(), THE_POOL); - boolean seq = ThreadLocalRandom.current().nextBoolean(); - universeTransaction.put("test", seq ? Collection.sequential(test) : test); - universeTransaction.stop(); - universeTransaction.waitForEnd(); + Logic.run(test); } static void isTrue(Goal goal) { From 91a157b444f7d8d239011ce9b53e5dbd1a4bd168 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 09:16:55 +0100 Subject: [PATCH 143/179] remove logic from DClare --- .../{dclare => }/logic/Arithmetic.java | 0 .../{dclare => }/logic/Logic.java | 0 .../modelingvalue/dclare/test/LogicTest.java | 379 ------------------ 3 files changed, 379 deletions(-) rename src/main/java/org/modelingvalue/{dclare => }/logic/Arithmetic.java (100%) rename src/main/java/org/modelingvalue/{dclare => }/logic/Logic.java (100%) delete mode 100644 src/test/java/org/modelingvalue/dclare/test/LogicTest.java diff --git a/src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java b/src/main/java/org/modelingvalue/logic/Arithmetic.java similarity index 100% rename from src/main/java/org/modelingvalue/dclare/logic/Arithmetic.java rename to src/main/java/org/modelingvalue/logic/Arithmetic.java diff --git a/src/main/java/org/modelingvalue/dclare/logic/Logic.java b/src/main/java/org/modelingvalue/logic/Logic.java similarity index 100% rename from src/main/java/org/modelingvalue/dclare/logic/Logic.java rename to src/main/java/org/modelingvalue/logic/Logic.java diff --git a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java b/src/test/java/org/modelingvalue/dclare/test/LogicTest.java deleted file mode 100644 index 73215fdc..00000000 --- a/src/test/java/org/modelingvalue/dclare/test/LogicTest.java +++ /dev/null @@ -1,379 +0,0 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus ~ -// ~ -// Contributors: ~ -// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ -// --------------------------------------------------------------------------------------------------------------------- ~ -// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ -// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ -// but also our friend. "He will live on in many of the lines of code you see below." ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -package org.modelingvalue.dclare.test; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.modelingvalue.dclare.logic.Arithmetic.*; -import static org.modelingvalue.dclare.logic.Logic.*; - -import org.junit.jupiter.api.RepeatedTest; -import org.modelingvalue.collections.Map; -import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.dclare.logic.Arithmetic.IntAtom; -import org.modelingvalue.dclare.logic.Logic; -import org.modelingvalue.dclare.logic.Logic.*; - -public class LogicTest { - - // Utilities - - void run(Runnable test) { - Logic.run(test); - } - - static void isTrue(Goal goal) { - assertTrue(Logic.isTrue(goal)); - } - - static void isFalse(Goal goal) { - assertTrue(Logic.isFalse(goal)); - } - - static void isIncomplete(Goal goal) { - assertTrue(Logic.isIncomplete(goal)); - } - - @SafeVarargs - static void hasBindings(Goal goal, Map... bindings) { - assertEquals(Set.of(bindings), getBindings(goal)); - } - - // Root - - interface Root extends Term { - } - - interface RootAtom extends Root, Atom { - } - - interface RootFunc extends Root, Func { - } - - static Functor rootAtom = functor((SerializableFunction) LogicTest::root); - - static RootAtom root(String name) { - return term(rootAtom, name); - } - - static RootAtom rootAtomVar(String name) { - return var(RootAtom.class, name); - } - - static Root rootVar(String name) { - return var(Root.class, name); - } - - static Functor rootPerson = functor(LogicTest::rootPerson); - - static Pred rootPerson(RootAtom root, PersonAtom person) { - return term(rootPerson, root, person); - } - - static Functor rootFunc = functor((SerializableFunction) LogicTest::root); - - static RootFunc root(Person person) { - return term(rootFunc, person); - } - - // Family Tree - - interface Person extends Term { - } - - interface PersonAtom extends Person, Atom { - } - - interface PersonFunc extends Person, Func { - } - - static Functor strPerson = functor((SerializableFunction) LogicTest::person); - - static PersonAtom person(String name) { - return term(strPerson, name); - } - - static Functor intPerson = functor((SerializableFunction) LogicTest::person); - - static PersonAtom person(IntAtom i) { - return term(intPerson, i); - } - - static PersonAtom person(int i) { - return person(i(i)); - } - - static PersonAtom personAtomVar(String name) { - return var(PersonAtom.class, name); - } - - static Person personVar(String name) { - return var(Person.class, name); - } - - static Functor parentChild = functor(LogicTest::parentChild); - - static Rel parentChild(PersonAtom parent, PersonAtom child) { - return term(parentChild, parent, child); - } - - static Functor parent = functor(LogicTest::parent); - - static PersonFunc parent(Person child) { - return term(parent, child); - } - - static Functor child = functor(LogicTest::child); - - static PersonFunc child(Person parent) { - return term(child, parent); - } - - static Functor ancestorDescendent = functor(LogicTest::ancestorDescendent); - - static Pred ancestorDescendent(PersonAtom ancestor, PersonAtom descendent) { - return term(ancestorDescendent, ancestor, descendent); - } - - static Functor ancestor = functor(LogicTest::ancestor); - - static PersonFunc ancestor(Person descendent) { - return term(ancestor, descendent); - } - - static Functor descendent = functor(LogicTest::descendent); - - static PersonFunc descendent(Person ancestor) { - return term(descendent, ancestor); - } - - // Variables - - IntAtom P = iav("P"); - IntAtom Q = iav("Q"); - - PersonAtom A = personAtomVar("A"); - PersonAtom B = personAtomVar("B"); - PersonAtom C = personAtomVar("C"); - - Person X = personVar("X"); - Person Y = personVar("Y"); - Person Z = personVar("Z"); - - RootAtom U = rootAtomVar("U"); - Root V = rootVar("V"); - - @SuppressWarnings("unchecked") - L PL = var(L.class, "PL"); - - // Terms - - PersonAtom Carel = person("Carel"); - PersonAtom Jan = person("Jan"); - PersonAtom Elske = person("Elske"); - PersonAtom Wim = person("Wim"); - PersonAtom Joppe = person("Joppe"); - PersonAtom Heleen = person("Heleen"); - PersonAtom Marijn = person("Marijn"); - - RootAtom Root = root("Root"); - - // Root Rules - - private void rootRules() { - arithmeticRules(); - - rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); - rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); - - rule(is(root(X), U), goal(is(X, B), rootPerson(U, B))); - - rule(parentChild(person(Q), person(P)), goal(lt(Q, i(4)), is(plus(Q, i(1)), P))); - rule(rootPerson(U, person(0)), goal()); - rule(rootPerson(U, C), goal(rootPerson(U, A), parentChild(A, C))); - } - - // Family Rules - - private void familyRules() { - isRules(); - - rule(is(parent(X), A), goal(is(X, B), parentChild(A, B))); - rule(is(child(X), A), goal(is(X, B), parentChild(B, A))); - - rule(is(ancestor(X), A), goal(is(X, B), ancestorDescendent(A, B))); - rule(is(descendent(X), A), goal(is(X, B), ancestorDescendent(B, A))); - - rule(ancestorDescendent(A, C), goal(parentChild(A, C))); - rule(ancestorDescendent(A, C), goal(ancestorDescendent(A, B), parentChild(B, C))); - } - - @RepeatedTest(100) - public void famTest0() { - run(() -> { - familyRules(); - - fact(parentChild(Carel, Jan)); - fact(parentChild(Jan, Wim)); - fact(parentChild(Elske, Wim)); - fact(parentChild(Wim, Joppe)); - fact(parentChild(Heleen, Joppe)); - fact(parentChild(Wim, Marijn)); - fact(parentChild(Heleen, Marijn)); - - isTrue(goal(is(parent(Joppe), Heleen))); - isTrue(goal(is(Wim, child(Jan)))); - - isFalse(goal(is(Marijn, parent(Wim)))); - isFalse(goal(is(parent(Wim), Heleen))); - isFalse(goal(is(child(Wim), Wim))); - - isTrue(goal(is(ancestor(Marijn), Wim))); - isTrue(goal(is(descendent(Carel), Marijn))); - - isFalse(goal(is(descendent(Marijn), Wim))); - isFalse(goal(is(descendent(Heleen), Wim))); - isFalse(goal(is(descendent(Joppe), Carel))); - isFalse(goal(is(descendent(Carel), Carel))); - }); - } - - @RepeatedTest(100) - public void famTest1() { - run(() -> { - familyRules(); - - fact(parentChild(Carel, Jan)); - fact(parentChild(Jan, Wim)); - fact(parentChild(Elske, Wim)); - fact(parentChild(Wim, Joppe)); - fact(parentChild(Heleen, Joppe)); - fact(parentChild(Wim, Marijn)); - fact(parentChild(Heleen, Marijn)); - - isTrue(goal(parentChild(Heleen, Joppe))); - isTrue(goal(parentChild(Jan, Wim))); - - isFalse(goal(parentChild(Marijn, Wim))); - isFalse(goal(parentChild(Heleen, Wim))); - isFalse(goal(parentChild(Wim, Wim))); - - isTrue(goal(ancestorDescendent(Wim, Marijn))); - isTrue(goal(ancestorDescendent(Carel, Marijn))); - - isFalse(goal(ancestorDescendent(Marijn, Wim))); - isFalse(goal(ancestorDescendent(Heleen, Wim))); - isFalse(goal(ancestorDescendent(Joppe, Carel))); - isFalse(goal(ancestorDescendent(Carel, Carel))); - - hasBindings(goal(collect(parentChild(Wim, C), add(C, l(), PL))), binding(PL, l(Joppe, Marijn))); - }); - } - - @RepeatedTest(100) - public void famTest2() { - run(() -> { - familyRules(); - - PersonAtom Carel = person("Carel"); - PersonAtom Jan = person("Jan"); - PersonAtom Wim = person("Wim"); - - fact(parentChild(Carel, Jan)); - fact(parentChild(Jan, Wim)); - - hasBindings(goal(ancestorDescendent(A, Wim)), binding(A, Jan), binding(A, Carel)); - hasBindings(goal(ancestorDescendent(Carel, C)), binding(C, Jan), binding(C, Wim)); - }); - } - - @RepeatedTest(100) - public void famTest3() { - run(() -> { - rule(parentChild(B, C), goal(parentChild(B, C))); - - PersonAtom Jan = person("Jan"); - PersonAtom Wim = person("Wim"); - - hasBindings(goal(parentChild(Wim, Jan)), incomplete(parentChild(Wim, Jan), parentChild(Wim, Jan))); - isIncomplete(goal(parentChild(Wim, Jan))); - }); - } - - @RepeatedTest(100) - public void famTest4() { - run(() -> { - rootRules(); - - isTrue(goal(is(child(person(0)), person(1)))); - isTrue(goal(is(child(person(3)), person(4)))); - isFalse(goal(is(child(person(4)), person(5)))); - - isTrue(goal(is(root(person(0)), Root))); - isTrue(goal(is(root(person(1)), Root))); - isTrue(goal(is(root(person(4)), Root))); - isTrue(goal(is(root(person(3)), Root))); - isTrue(goal(is(root(person(2)), Root))); - - hasBindings(goal(is(root(C), Root)), binding(C, person(0)), binding(C, person(1)), // - binding(C, person(2)), binding(C, person(3)), binding(C, person(4))); - }); - } - - @RepeatedTest(100) - public void intTest() { - run(() -> { - arithmeticRules(); - - hasBindings(goal(plus(i(7), i(3), P)), binding(P, i(10))); - hasBindings(goal(plus(i(7), P, i(10))), binding(P, i(3))); - hasBindings(goal(plus(P, i(3), i(10))), binding(P, i(7))); - }); - } - - @RepeatedTest(100) - public void isTest() { - run(() -> { - arithmeticRules(); - - isTrue(goal(is(plus(i(11), i(22)), i(33)))); - isTrue(goal(is(minus(i(33), i(22)), i(11)))); - isTrue(goal(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), i(110)))); - - isTrue(goal(is(plus(i(11), divide(multiply(i(44), i(33)), i(22))), i(77)))); - - isTrue(goal(is(sqrt(i(49)), i(7)))); - isTrue(goal(is(sqrt(i(49)), i(-7)))); - - hasBindings(goal(is(plus(i(11), plus(plus(i(22), i(33)), i(44))), P)), binding(P, i(110))); - hasBindings(goal(is(plus(i(11), plus(plus(i(22), P), i(44))), i(110))), binding(P, i(33))); - hasBindings(goal(is(plus(i(7), i(3)), P)), binding(P, i(10))); - hasBindings(goal(is(plus(i(7), P), i(10))), binding(P, i(3))); - hasBindings(goal(is(plus(P, i(3)), i(10))), binding(P, i(7))); - - hasBindings(goal(is(sqrt(i(49)), P)), binding(P, i(7)), binding(P, i(-7))); - - hasBindings(goal(collect(is(sqrt(i(49)), P), plus(P, i(0), Q))), binding(Q, i(0))); - }); - } - -} From 6506e96209fd30ee77219ca5a30e803a85acaf47 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 10 Dec 2024 09:17:15 +0100 Subject: [PATCH 144/179] remove Logic from DClare --- .../org/modelingvalue/logic/Arithmetic.java | 263 --- .../java/org/modelingvalue/logic/Logic.java | 1440 ----------------- 2 files changed, 1703 deletions(-) delete mode 100644 src/main/java/org/modelingvalue/logic/Arithmetic.java delete mode 100644 src/main/java/org/modelingvalue/logic/Logic.java diff --git a/src/main/java/org/modelingvalue/logic/Arithmetic.java b/src/main/java/org/modelingvalue/logic/Arithmetic.java deleted file mode 100644 index f72cac4b..00000000 --- a/src/main/java/org/modelingvalue/logic/Arithmetic.java +++ /dev/null @@ -1,263 +0,0 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus ~ -// ~ -// Contributors: ~ -// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ -// --------------------------------------------------------------------------------------------------------------------- ~ -// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ -// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ -// but also our friend. "He will live on in many of the lines of code you see below." ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -package org.modelingvalue.dclare.logic; - -import static org.modelingvalue.dclare.logic.Logic.*; - -import java.math.BigInteger; - -import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.util.SerializableBiFunction; -import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.collections.util.SerializableTriFunction; -import org.modelingvalue.dclare.logic.Logic.Atom; -import org.modelingvalue.dclare.logic.Logic.Func; -import org.modelingvalue.dclare.logic.Logic.Functor; -import org.modelingvalue.dclare.logic.Logic.Pred; -import org.modelingvalue.dclare.logic.Logic.Term; -import org.modelingvalue.dclare.logic.Logic.TermImpl; - -public final class Arithmetic { - - private Arithmetic() { - } - - // Integer - - public static interface Int extends Term { - } - - public static interface IntAtom extends Int, Atom { - } - - public static interface IntFunc extends Int, Func { - } - - private static Functor i = functor((SerializableFunction) Arithmetic::i); - - private static IntAtom i(BigInteger x) { - return term(i, x); - } - - public static IntAtom i(long x) { - return i(BigInteger.valueOf(x)); - } - - public static IntAtom iav(String name) { - return var(IntAtom.class, name); - } - - public static Int iv(String name) { - return var(Int.class, name); - } - - // Operators - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor compare = functor((SerializableTriFunction) Arithmetic::compare, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - BigInteger ci = ct != null ? ct.getVal(1) : null; - if (ai != null && bi != null) { - BigInteger r = BigInteger.valueOf(ai.compareTo(bi)); - if (ci != null) { - return ci.equals(r) ? Set.of(t) : Set.of(); - } else { - return Set.of(t.set(3, at.set(1, r))); - } - } else if (BigInteger.ZERO.equals(ci)) { - if (ai != null) { - return Set.of(t.set(2, at)); - } else if (bi != null) { - return Set.of(t.set(1, bt)); - } - } - return t.incomplete(); - }); - - public static Pred compare(IntAtom a, IntAtom b, IntAtom c) { - return term(compare, a, b, c); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor plusPred = functor((SerializableTriFunction) Arithmetic::plus, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - BigInteger ci = ct != null ? ct.getVal(1) : null; - if (ai != null && bi != null && ci != null) { - return ai.add(bi).equals(ci) ? Set.of(t) : Set.of(); - } else if (ai != null && bi != null && ci == null) { - return Set.of(t.set(3, at.set(1, ai.add(bi)))); - } else if (ai != null && bi == null && ci != null) { - return Set.of(t.set(2, at.set(1, ci.subtract(ai)))); - } else if (ai == null && bi != null && ci != null) { - return Set.of(t.set(1, bt.set(1, ci.subtract(bi)))); - } else { - return t.incomplete(); - } - }); - - public static Pred plus(IntAtom a, IntAtom b, IntAtom r) { - return term(plusPred, a, b, r); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor multiplyPred = functor((SerializableTriFunction) Arithmetic::multiply, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - TermImpl ct = t.getTerm(3); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - BigInteger ci = ct != null ? ct.getVal(1) : null; - if (ai != null && bi != null && ci != null) { - return ai.multiply(bi).equals(ci) ? Set.of(t) : Set.of(); - } else if (ai != null && bi != null && ci == null) { - return Set.of(t.set(3, at.set(1, ai.multiply(bi)))); - } else if (ai != null && bi == null && ci != null) { - return Set.of(t.set(2, at.set(1, ci.divide(ai)))); - } else if (ai == null && bi != null && ci != null) { - return Set.of(t.set(1, bt.set(1, ci.divide(bi)))); - } else { - return t.incomplete(); - } - }); - - public static Pred multiply(IntAtom a, IntAtom b, IntAtom r) { - return term(multiplyPred, a, b, r); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor powerPred = functor((SerializableBiFunction) Arithmetic::power, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - BigInteger ai = at != null ? at.getVal(1) : null; - BigInteger bi = bt != null ? bt.getVal(1) : null; - if (ai != null && bi != null) { - return ai.multiply(ai).equals(bi) ? Set.of(t) : Set.of(); - } else if (ai != null && bi == null) { - return Set.of(t.set(2, at.set(1, ai.multiply(ai)))); - } else if (ai == null && bi != null) { - BigInteger sqrt = bi.sqrt(); - return Set.of(t.set(1, bt.set(1, sqrt)), t.set(1, bt.set(1, sqrt.negate()))); - } else { - return t.incomplete(); - } - }); - - public static Pred power(IntAtom a, IntAtom r) { - return term(powerPred, a, r); - } - - // Functions - - private static Functor gt = functor(Arithmetic::gt); - - public static Pred gt(Int a, Int b) { - return term(gt, a, b); - } - - private static Functor lt = functor(Arithmetic::lt); - - public static Pred lt(Int a, Int b) { - return term(lt, a, b); - } - - private static Functor ge = functor(Arithmetic::ge); - - public static Pred ge(Int a, Int b) { - return term(ge, a, b); - } - - private static Functor le = functor(Arithmetic::le); - - public static Pred le(Int a, Int b) { - return term(le, a, b); - } - - private static Functor plusFunc = functor((SerializableBiFunction) Arithmetic::plus); - - public static IntFunc plus(Int a, Int b) { - return term(plusFunc, a, b); - } - - private static Functor minusFunc = functor((SerializableBiFunction) Arithmetic::minus); - - public static IntFunc minus(Int a, Int b) { - return term(minusFunc, a, b); - } - - private static Functor multiplyFunc = functor((SerializableBiFunction) Arithmetic::multiply); - - public static IntFunc multiply(Int a, Int b) { - return term(multiplyFunc, a, b); - } - - private static Functor divideFunc = functor((SerializableBiFunction) Arithmetic::divide); - - public static IntFunc divide(Int a, Int b) { - return term(divideFunc, a, b); - } - - private static Functor powerFunc = functor((SerializableFunction) Arithmetic::power); - - public static IntFunc power(Int a) { - return term(powerFunc, a); - } - - private static Functor sqrtFunc = functor((SerializableFunction) Arithmetic::sqrt); - - public static IntFunc sqrt(Int a) { - return term(sqrtFunc, a); - } - - // Is Rules - - public static void arithmeticRules() { - isRules(); - - IntAtom P = iav("PL"); - IntAtom Q = iav("QL"); - IntAtom R = iav("RL"); - - Int X = iv("X"); - Int Y = iv("Y"); - - rule(is(plus(X, Y), R), goal(is(X, P), is(Y, Q), plus(P, Q, R))); - rule(is(minus(X, Y), R), goal(is(X, P), is(Y, Q), plus(R, Q, P))); - rule(is(multiply(X, Y), R), goal(is(X, P), is(Y, Q), multiply(P, Q, R))); - rule(is(divide(X, Y), R), goal(is(X, P), is(Y, Q), multiply(R, Q, P))); - rule(is(power(X), R), goal(is(X, P), power(P, R))); - rule(is(sqrt(X), R), goal(is(X, P), power(R, P))); - rule(gt(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(1)))); - rule(lt(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(-1)))); - rule(ge(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(1)))); - rule(ge(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(0)))); - rule(le(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(-1)))); - rule(le(X, Y), goal(is(X, P), is(Y, Q), compare(P, Q, i(0)))); - } - -} diff --git a/src/main/java/org/modelingvalue/logic/Logic.java b/src/main/java/org/modelingvalue/logic/Logic.java deleted file mode 100644 index ec85cae2..00000000 --- a/src/main/java/org/modelingvalue/logic/Logic.java +++ /dev/null @@ -1,1440 +0,0 @@ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ -// ~ -// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ -// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ -// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ -// specific language governing permissions and limitations under the License. ~ -// ~ -// Maintainers: ~ -// Wim Bast, Tom Brus ~ -// ~ -// Contributors: ~ -// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ -// --------------------------------------------------------------------------------------------------------------------- ~ -// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ -// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ -// but also our friend. "He will live on in many of the lines of code you see below." ~ -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -package org.modelingvalue.dclare.logic; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.BiFunction; -import java.util.function.Function; - -import org.modelingvalue.collections.Collection; -import org.modelingvalue.collections.Entry; -import org.modelingvalue.collections.List; -import org.modelingvalue.collections.Map; -import org.modelingvalue.collections.Set; -import org.modelingvalue.collections.struct.impl.StructImpl; -import org.modelingvalue.collections.util.Context; -import org.modelingvalue.collections.util.SerializableBiFunction; -import org.modelingvalue.collections.util.SerializableBiFunction.SerializableBiFunctionImpl; -import org.modelingvalue.collections.util.SerializableFunction; -import org.modelingvalue.collections.util.SerializableFunction.SerializableFunctionImpl; -import org.modelingvalue.collections.util.SerializableQuadFunction; -import org.modelingvalue.collections.util.SerializableQuadFunction.SerializableQuadFunctionImpl; -import org.modelingvalue.collections.util.SerializableSupplier; -import org.modelingvalue.collections.util.SerializableSupplier.SerializableSupplierImpl; -import org.modelingvalue.collections.util.SerializableTriFunction; -import org.modelingvalue.collections.util.SerializableTriFunction.SerializableTriFunctionImpl; -import org.modelingvalue.collections.util.StringUtil; - -public final class Logic { - - private Logic() { - } - - private static final Context DATABASE = Context.of(); - - public static final void run(Runnable runnable) { - DATABASE.run(new Database(), runnable); - } - - @SuppressWarnings("rawtypes") - private static final class Database { - private final AtomicReference>> facts = new AtomicReference<>(Map.of()); - private final AtomicReference>> rules = new AtomicReference<>(Map.of()); - } - - private static final boolean TRACE_LOGIC = Boolean.getBoolean("TRACE_LOGIC"); - - @SuppressWarnings("rawtypes") - private static final BiFunction, TermImpl, Set> ADD_FACT = (s, e) -> s == null ? Set.of(e) : s.add(e); - - private static final BiFunction, RuleImpl, List> ADD_RULE = (l, e) -> { - if (l == null) { - return List.of(e); - } else { - int p = e.rulePrio(); - for (int i = 0; i < l.size(); i++) { - RuleImpl r = l.get(i); - if (r.equals(e)) { - return l; - } else if (r.rulePrio() > p) { - return l.insert(i, e); - } - } - return l.append(e); - } - }; - - private static abstract class ClauseImpl extends StructImpl implements InvocationHandler, Comparable> { - private static final long serialVersionUID = 7315776001191198132L; - - private static final Method EQUALS; - private static final Method HASHCODE; - private static final Method TO_STRING; - static { - try { - EQUALS = Object.class.getMethod("equals", Object.class); - HASHCODE = Object.class.getMethod("hashCode"); - TO_STRING = Object.class.getMethod("toString"); - } catch (NoSuchMethodException | SecurityException e) { - throw new Error(e); - } - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - if (method.equals(EQUALS)) { - if (proxy == args[0]) { - return true; - } else if (args[0] == null) { - return false; - } else if (args[0].getClass() != proxy.getClass()) { - return false; - } else { - return super.equals(Logic.unproxy(args[0])); - } - } else if (method.equals(HASHCODE)) { - return super.hashCode(); - } else if (method.equals(TO_STRING)) { - return toString(); - } else { - throw new Error("No handler for " + method); - } - } - - protected ClauseImpl(Functor functor, Object... args) { - super(unproxy(functor, args)); - } - - protected ClauseImpl(FunctImpl functor, Object... args) { - super(array(functor, args)); - } - - protected ClauseImpl(Class type, Object... args) { - super(array(type, args)); - } - - protected ClauseImpl(Object[] args) { - super(args); - } - - private static final Object[] array(Object functor, Object[] args) { - Object[] result = new Object[args.length + 1]; - result[0] = noProxy(functor); - for (int i = 0; i < args.length; i++) { - result[i + 1] = noProxy(args[i]); - } - return result; - } - - @SuppressWarnings("rawtypes") - private static final Object[] unproxy(Functor functor, Object[] args) { - Object[] result = new Object[args.length + 1]; - result[0] = Logic.unproxy(functor); - for (int i = 0; i < args.length; i++) { - result[i + 1] = Logic.unproxy(args[i]); - } - return result; - } - - protected abstract F proxy(); - - protected abstract Class type(); - - protected abstract ClauseImpl term(Object[] array); - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public int compareTo(ClauseImpl o) { - int r = length() - o.length(); - if (r != 0) { - return r; - } - for (int i = 0; i < length(); i++) { - Object tv = get(i); - Object ov = o.get(i); - if (tv instanceof Comparable && tv.getClass().equals(ov.getClass())) { - r = ((Comparable) tv).compareTo(ov); - if (r != 0) { - break; - } - } else { - String ts = StringUtil.toString(tv); - String os = StringUtil.toString(ov); - r = ts.compareTo(os); - if (r != 0) { - break; - } - } - } - return r; - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - protected ClauseImpl eq(ClauseImpl other) { - if (this == other) { - return this; - } - Object[] array = toArray(); - for (int i = 0; i < array.length; i++) { - Object tv = get(i); - Object ov = other.get(i); - if (tv != ov) { - if (tv instanceof ClauseImpl && ov instanceof ClauseImpl) { - ClauseImpl eq = ((ClauseImpl) tv).eq((ClauseImpl) ov); - if (eq != null) { - array[i] = eq; - } else { - return null; - } - } else if (tv instanceof ClauseImpl && ov instanceof Class) { - if (((Class) ov).isAssignableFrom(((ClauseImpl) tv).type())) { - array[i] = tv; - } else { - return null; - } - } else if (tv instanceof Class && ov instanceof ClauseImpl) { - if (((Class) tv).isAssignableFrom(((ClauseImpl) ov).type())) { - array[i] = ov; - } else { - return null; - } - } else if (!(tv instanceof Class) && ov instanceof Class) { - if (((Class) ov).isAssignableFrom(tv.getClass())) { - array[i] = tv; - } else { - return null; - } - } else if (tv instanceof Class && !(ov instanceof Class)) { - if (((Class) tv).isAssignableFrom(ov.getClass())) { - array[i] = ov; - } else { - return null; - } - } else if (!Objects.equals(tv, ov)) { - return null; - } - } - } - return term(array); - } - } - - private static final Object noProxy(Object object) { - if (object instanceof Term) { - throw new IllegalArgumentException(); - } else { - return object; - } - } - - @SuppressWarnings("rawtypes") - protected static final Object unproxy(Object object) { - if (object instanceof Term) { - return Proxy.getInvocationHandler(object); - } else { - Objects.requireNonNull(object); - return object; - } - } - - @SuppressWarnings("unchecked") - private static final > R unproxy(T object) { - return (R) Proxy.getInvocationHandler(object); - } - - @SuppressWarnings("rawtypes") - private static final Object proxy(Object object) { - if (object instanceof ClauseImpl) { - return ((ClauseImpl) object).proxy(); - } else { - return object; - } - } - - // Functor - - public interface Functor extends Term { - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static FunctImpl functImpl(SerializableSupplier method, SerializableFunction, Collection> impl) { - SerializableSupplierImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Functor functor(SerializableSupplier method, SerializableFunction, Collection> impl) { - return functImpl(method, impl).proxy(); - } - - @SuppressWarnings("unchecked") - public static Functor functor(SerializableSupplier method) { - return functImpl(method, null).proxy(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static FunctImpl functImpl(SerializableFunction method, SerializableFunction, Collection> impl) { - SerializableFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Functor functor(SerializableFunction method, SerializableFunction, Collection> impl) { - return functImpl(method, impl).proxy(); - } - - @SuppressWarnings("unchecked") - public static Functor functor(SerializableFunction method) { - return functImpl(method, null).proxy(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static FunctImpl functImpl(SerializableBiFunction method, SerializableFunction, Collection> impl) { - SerializableBiFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Functor functor(SerializableBiFunction method, SerializableFunction, Collection> impl) { - return functImpl(method, impl.of()).proxy(); - } - - @SuppressWarnings("unchecked") - public static Functor functor(SerializableBiFunction method) { - return functImpl(method, null).proxy(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static FunctImpl functImpl(SerializableTriFunction method, SerializableFunction, Collection> impl) { - SerializableTriFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Functor functor(SerializableTriFunction method, SerializableFunction, Collection> impl) { - return functImpl(method, impl).proxy(); - } - - @SuppressWarnings("unchecked") - public static Functor functor(SerializableTriFunction method) { - return functImpl(method, null).proxy(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static FunctImpl functImpl(SerializableQuadFunction method, SerializableFunction, Collection> impl) { - SerializableQuadFunctionImpl l = method.of(); - return new FunctImpl((Class) l.out(), l.getImplMethodName(), l.in(), impl != null ? impl.of() : null); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Functor functor(SerializableQuadFunction method, SerializableFunction, Collection> impl) { - return functImpl(method, impl).proxy(); - } - - @SuppressWarnings("unchecked") - public static Functor functor(SerializableQuadFunction method) { - return functImpl(method, null).proxy(); - } - - public static final class FunctImpl extends ClauseImpl> { - private static final long serialVersionUID = 285147889847599160L; - - @SuppressWarnings({"unchecked", "rawtypes"}) - private FunctImpl(Class type, String name, List> args, SerializableFunction, Collection> l) { - super((Class) Functor.class, type, name, args, l); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private FunctImpl(Object[] args) { - super(args); - } - - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - protected final Functor proxy() { - return (Functor) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Functor.class}, this); - } - - @Override - public String toString() { - return ((String) get(2)); - } - - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - protected FunctImpl term(Object[] array) { - return new FunctImpl(array); - } - - @SuppressWarnings("unchecked") - @Override - protected Class> type() { - return (Class>) get(0); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - protected List args() { - return (List) get(3); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - protected SerializableFunction, Collection> lambda() { - return (SerializableFunction, Collection>) get(4); - } - - @SuppressWarnings("unchecked") - protected Class functType() { - return (Class) get(1); - } - } - - // Lists - - public interface L extends Term { - } - - @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_0 = functImpl((SerializableSupplier) Logic::l, null); - @SuppressWarnings("rawtypes") - private static final FunctImpl LIST_FUNCTOR_2 = functImpl((SerializableBiFunction) Logic::l, null); - @SuppressWarnings("rawtypes") - private static final Functor LIST_FUNCTOR_2_PROXY = LIST_FUNCTOR_2.proxy(); - @SuppressWarnings("rawtypes") - private static final TermImpl EMPTY_LIST = termImpl(LIST_FUNCTOR_0); - @SuppressWarnings("rawtypes") - private static final L EMPTY_LIST_PROXY = EMPTY_LIST.proxy(); - - @SuppressWarnings("unchecked") - public static L l(E head, L tail) { - return term(LIST_FUNCTOR_2_PROXY, head, tail); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static L l() { - return EMPTY_LIST_PROXY; - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static L l(E... es) { - return list(es).proxy(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static TermImpl list(E... es) { - TermImpl l = EMPTY_LIST; - for (int i = es.length - 1; i >= 0; i--) { - l = termImpl(LIST_FUNCTOR_2, unproxy(es[i]), l); - } - return l; - } - - @SuppressWarnings("rawtypes") - private static TermImpl list(List es) { - TermImpl l = EMPTY_LIST; - for (int i = es.size() - 1; i >= 0; i--) { - l = termImpl(LIST_FUNCTOR_2, unproxy(es.get(i)), l); - } - return l; - } - - // Add - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static List addOrdered(List l, TermImpl e) { - for (int i = 0; i < l.size(); i++) { - if (l.get(i).compareTo(e) > 0) { - return l.insert(i, e); - } - } - return l.append(e); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Set> remove(List l, TermImpl e) { - Set> ls = Set.of(); - for (int i = l.firstIndexOf(e); i >= 0; i = l.firstIndexOf(i, l.size(), e)) { - ls = ls.add(l.removeIndex(i)); - } - return ls; - } - - @SuppressWarnings("rawtypes") - private static final FunctImpl ADD_FUNCTOR = functImpl((SerializableTriFunction) Logic::add, t -> { - TermImpl e = t.getTerm(1); - TermImpl i = t.getTerm(2); - TermImpl o = t.getTerm(3); - List il = i != null ? i.list() : null; - List ol = o != null ? o.list() : null; - if (e != null && il != null && ol != null) { - return addOrdered(il, e).equals(ol) ? Set.of(t) : Set.of(); - } else if (e != null && il != null && ol == null) { - return Set.of(t.set(3, list(addOrdered(il, e)))); - } else if (e != null && il == null && ol != null) { - return remove(ol, e).map(r -> (TermImpl) t.set(2, r)).asSet(); - } else if (e == null && il != null && ol != null) { - if (il.anyMatch(ol::notContains)) { - return Set.of(); - } - return ol.removeAll(il).map(r -> (TermImpl) t.set(1, r)).asSet(); - } else { - return t.incomplete(); - } - }); - @SuppressWarnings("rawtypes") - private static final Functor ADD_FUNCTOR_PROXY = ADD_FUNCTOR.proxy(); - - public static Pred add(E e, L i, L o) { - return term(ADD_FUNCTOR_PROXY, e, i, o); - } - - // Variables - - public static interface Variable extends Term { - } - - @SuppressWarnings("unchecked") - public static F var(Class type, String id) { - return new VarImpl(type, id).proxy(); - } - - private static final class VarImpl extends ClauseImpl { - private static final long serialVersionUID = -8998368070388908726L; - - private VarImpl(Class type, String name) { - super(type, name); - } - - private VarImpl(Object[] args) { - super(args); - } - - @Override - @SuppressWarnings("unchecked") - protected final F proxy() { - return (F) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{type(), Variable.class}, this); - } - - @Override - public String toString() { - return get(1).toString(); - } - - @Override - @SuppressWarnings("unchecked") - protected VarImpl term(Object[] array) { - return new VarImpl(array); - } - - @SuppressWarnings("unchecked") - @Override - protected Class type() { - return (Class) get(0); - } - } - - // Terms - - public static interface Term { - } - - public static interface Pred extends Term { - } - - public static interface Rel extends Pred { - } - - @SuppressWarnings("unchecked") - public static F term(Functor functor, Object... args) { - return new TermImpl(functor, args).proxy(); - } - - private static TermImpl termImpl(FunctImpl functor, Object... args) { - return new TermImpl(functor, args); - } - - public static class TermImpl extends ClauseImpl { - private static final long serialVersionUID = -1605559565948158856L; - - private TermImpl(Functor functor, Object... args) { - super(functor, args); - } - - private TermImpl(FunctImpl functor, Object... args) { - super(functor, args); - } - - private TermImpl(Object[] args) { - super(args); - } - - @Override - @SuppressWarnings("unchecked") - protected F proxy() { - return (F) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{type()}, this); - } - - @Override - @SuppressWarnings("unchecked") - protected TermImpl term(Object[] array) { - return new TermImpl(array); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public String toString() { - if (type() == L.class) { - return list().toString().substring(4); - } else { - String string = super.toString(); - return string.substring(1, string.length() - 1).replaceFirst(",", "(") + ")"; - } - } - - public boolean isAtom() { - for (int i = 1; i < length(); i++) { - if (get(i) instanceof TermImpl) { - return false; - } - } - return true; - } - - @SuppressWarnings("unchecked") - @Override - public Class type() { - return functor().functType(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public FunctImpl functor() { - return (FunctImpl) get(0); - } - - @SuppressWarnings("rawtypes") - protected final void makeFact(Database database) { - if (functor().lambda() != null) { - throw new IllegalArgumentException("No facts of a functor with a lambda allowed. " + this); - } - if (database.rules.get().get(functor()) != null) { - throw new IllegalArgumentException("No facts of a functor with rules allowed. " + this); - } - database.facts.updateAndGet(m -> m.put(this, ADD_FACT.apply(m.get(this), this))); - Object[] array = toArray(); - for (int i = 1; i < array.length; i++) { - array[i] = getType(i); - TermImpl term = term(array); - database.facts.updateAndGet(m -> m.put(term, ADD_FACT.apply(m.get(term), this))); - array = toArray(); - } - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - protected Map variables() { - Map vars = Map.of(); - for (int i = 1; i < length(); i++) { - if (get(i) instanceof VarImpl) { - vars = vars.put((VarImpl) get(i), ((VarImpl) get(i)).type()); - } else if (get(i) instanceof TermImpl) { - vars = vars.putAll(((TermImpl) get(i)).variables()); - } - } - return vars; - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - protected Map getBinding(TermImpl term, Map vars) { - if (get(0).equals(term.get(0))) { - for (int i = 1; i < length(); i++) { - Object tv = term.get(i); - Class tt = typeOf(tv); - tv = tv instanceof Class ? null : tv; - if (get(i) instanceof VarImpl) { - VarImpl var = (VarImpl) get(i); - Object vv = vars.get(var); - Class vt = typeOf(vv); - vv = vv instanceof Class ? null : vv; - if (vv != null) { - if (tv != null && !tv.equals(vv)) { - return null; - } - } else if (tv != null) { - if (var.type().isAssignableFrom(tt)) { - vars = vars.put(var, tv); - } else { - return null; - } - } else if (tt == null || !var.type().isAssignableFrom(tt)) { - return null; - } else if (vt != null && !vt.equals(tt)) { - return null; - } else { - vars = vars.put(var, tt); - } - } else if (get(i) instanceof TermImpl) { - TermImpl t = (TermImpl) get(i); - if (tv != null) { - if (tv instanceof TermImpl) { - vars = t.getBinding((TermImpl) tv, vars); - if (vars == null) { - return null; - } - } else { - return null; - } - } else if (tt == null || !t.type().isAssignableFrom(tt)) { - return null; - } - } else if (tv != null && !tv.equals(get(i))) { - return null; - } - } - return vars; - } else { - return null; - } - } - - @SuppressWarnings("rawtypes") - private static Class typeOf(Object v) { - return v instanceof ClauseImpl ? ((ClauseImpl) v).type() : v instanceof Class ? (Class) v : null; - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - protected TermImpl setBinding(Map vars) { - Object[] array = toArray(); - for (int i = 1; i < length(); i++) { - if (get(i) instanceof VarImpl) { - Object v = vars.get((VarImpl) get(i)); - if (v != null) { - array[i] = v; - } - } else if (get(i) instanceof TermImpl) { - array[i] = ((TermImpl) get(i)).setBinding(vars); - } - } - return term(array); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public TermImpl getTerm(int i) { - Object v = get(i); - return v instanceof TermImpl ? (TermImpl) v : null; - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public Class getType(int i) { - Object v = get(i); - return v instanceof Class ? (Class) v : v instanceof TermImpl ? ((TermImpl) v).type() : null; - } - - @SuppressWarnings("unchecked") - public V getVal(int i) { - Object v = get(i); - return v instanceof Class || v instanceof TermImpl ? null : (V) v; - } - - public TermImpl set(int i, Object v) { - Object[] array = toArray(); - array[i] = v; - return term(array); - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - public Set incomplete() { - return Set.of(Logic.incomplete(List.of(this))); - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - protected Collection match(TermImpl goal, List der, Map> rec, Database database) { - SerializableFunction, Collection> lambda = functor().lambda(); - if (lambda != null) { - return lambda.apply(this); - } - int non = nrOfNulls(); - if (non > 1 || non >= totalLength()) { - return Set.of(Logic.incomplete(der.append(this))); - } - Set facts = database.facts.get().get(this); - if (facts != null) { - return facts; - } - List rules = database.rules.get().get(functor()); - if (rules != null) { - Set r = rec.get(this); - if (r != null) { - return r; - } - int i = der.lastIndexOf(this); - if (i >= 0) { - return Set.of(Logic.incomplete(der.append(this))); - } - der = der.append(this); - Set set = Set.of(), add = Set.of(); - boolean found = false, incomplete = false; - do { - add = or(rules, non, der, add.isEmpty() ? rec : rec.put(this, add), database).removeAll(set); - found = add.anyMatch(this::equalFunctor); - incomplete |= add.anyMatch(this::isIncomplete); - if (incomplete && found && set.isEmpty()) { - add = add.filter(this::equalFunctor).asSet(); - } - set = set.addAll(add); - } while (found && incomplete); - memoization(set, database); - return set; - } - return Set.of(); - } - - @SuppressWarnings("rawtypes") - private void memoization(Set set, Database database) { - database.facts.updateAndGet(m -> m.put(this, set)); - for (TermImpl e : set) { - database.facts.updateAndGet(m -> m.put(e, Set.of(e))); - } - } - - @SuppressWarnings("rawtypes") - protected int termPrio(TermImpl goal, List der, Map> rec, Database database) { - int non = nrOfNulls(); - SerializableFunction, Collection> lambda = functor().lambda(); - if (lambda != null) { - Collection result = lambda.apply(this); - if (result instanceof Set) { - Set set = (Set) result; - return set.anyMatch(TermImpl::isIncomplete) ? Integer.MAX_VALUE : Integer.MIN_VALUE + set.size(); - } - return non - nrOfBindings(goal); - } - if (non > 1 || non >= totalLength()) { - return Integer.MAX_VALUE; - } - Set facts = database.facts.get().get(this); - if (facts != null) { - return Integer.MIN_VALUE + facts.size(); - } - List rules = database.rules.get().get(functor()); - if (rules != null) { - Set r = rec.get(this); - if (r != null) { - return Integer.MIN_VALUE + r.size(); - } - for (int i = der.size() - 1; i >= 0; i--) { - TermImpl other = der.get(i); - if (equals(other) || moreNullsThen(other) >= 0) { - return Integer.MAX_VALUE; - } - } - return non - nrOfBindings(goal); - } - return Integer.MIN_VALUE; - } - - @SuppressWarnings("rawtypes") - private Set or(List rules, int non, List der, Map> rec, Database database) { - Set r = Set.of(); - for (RuleImpl rule : rules) { - Set eval = rule.eval(this, der, rec, database); - if (non == 0 && eval.equals(Set.of(this))) { - return (Set) eval; - } - r = r.addAll(eval); - } - return r; - } - - @SuppressWarnings("rawtypes") - private int moreNullsThen(TermImpl other) { - if (!get(0).equals(other.get(0))) { - return Integer.MIN_VALUE; - } - int[] nr = new int[2]; - for (int i = 1; i < length(); i++) { - if (!Objects.equals(get(i), other.get(i))) { - if (get(i) == null || get(i) instanceof Class) { - nr[0]++; - } else if (other.get(i) == null || other.get(i) instanceof Class) { - nr[1]++; - } else if (get(i) instanceof TermImpl && other.get(i) instanceof TermImpl) { - int r = ((TermImpl) get(i)).moreNullsThen((TermImpl) other.get(i)); - if (r == Integer.MIN_VALUE) { - return Integer.MIN_VALUE; - } else { - nr[0] += r; - } - } else { - return Integer.MIN_VALUE; - } - } - } - return nr[0] - nr[1]; - } - - @SuppressWarnings("rawtypes") - protected List list() { - List l = List.of(); - TermImpl t = this; - while (t.length() == 3) { - l = l.add((TermImpl) t.get(1)); - t = (TermImpl) t.get(2); - } - return l; - } - - @SuppressWarnings("rawtypes") - protected int nrOfNulls() { - int nr = 0; - for (int i = 1; i < length(); i++) { - Object v = get(i); - if (v == null || v instanceof Class) { - nr++; - } else if (v instanceof TermImpl) { - nr += ((TermImpl) v).nrOfNulls(); - } - } - return nr; - } - - @SuppressWarnings("rawtypes") - protected int totalLength() { - int nr = 0; - for (int i = 1; i < length(); i++) { - Object v = get(i); - if (v instanceof TermImpl) { - nr += ((TermImpl) v).totalLength(); - } - nr++; - } - return nr; - } - - @SuppressWarnings("rawtypes") - protected int nrOfBindings(TermImpl goal) { - int nr = 0; - for (int i = 1; i < length(); i++) { - Object g = goal.get(i); - Object v = get(i); - if (g instanceof VarImpl && !(v == null || v instanceof Class)) { - nr++; - } else if (g instanceof TermImpl && v instanceof TermImpl) { - nr += ((TermImpl) v).nrOfBindings((TermImpl) g); - } - } - return nr; - } - - @SuppressWarnings("rawtypes") - protected boolean equalFunctor(TermImpl other) { - return functor() == other.functor(); - } - - @SuppressWarnings("rawtypes") - protected boolean isIncomplete(TermImpl other) { - return other.functor() == INCOMPLETE_FUNCTOR && ((TermImpl) other.get(1)).list().contains(this); - } - - protected boolean isIncomplete() { - return functor() == INCOMPLETE_FUNCTOR; - } - - @Override - @SuppressWarnings({"rawtypes", "unchecked"}) - protected TermImpl eq(ClauseImpl other) { - return (TermImpl) super.eq(other); - } - }; - - // Collect - - private static final FunctImpl COLLECT_FUNCTOR = functImpl((SerializableBiFunction) Logic::collect, null); - private static final Functor COLLECT_FUNCTOR_PROXY = COLLECT_FUNCTOR.proxy(); - - @SuppressWarnings("unchecked") - public static Pred collect(Pred pred, Pred accum) { - return new CollectImpl(pred, accum).proxy(); - } - - @SuppressWarnings("rawtypes") - protected static CollectImpl collectImpl(TermImpl pred, TermImpl accum) { - return new CollectImpl(pred, accum); - } - - private static final class CollectImpl extends TermImpl { - private static final long serialVersionUID = -2799691054715131197L; - - private CollectImpl(Pred pred, Pred accum) { - super(COLLECT_FUNCTOR_PROXY, pred, accum); - } - - @SuppressWarnings("rawtypes") - private CollectImpl(TermImpl pred, TermImpl accum) { - super(COLLECT_FUNCTOR, pred, accum); - } - - private CollectImpl(Object[] args) { - super(args); - } - - @Override - @SuppressWarnings("unchecked") - protected Pred proxy() { - return (Pred) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Pred.class}, this); - } - - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - protected CollectImpl term(Object[] array) { - return new CollectImpl(array); - } - - @SuppressWarnings("rawtypes") - protected final TermImpl pred() { - return ((TermImpl) get(1)); - } - - @SuppressWarnings("rawtypes") - protected final TermImpl accum() { - return ((TermImpl) get(2)); - } - - @SuppressWarnings("rawtypes") - private Map localVariables; - - @SuppressWarnings("rawtypes") - protected Map localVariables() { - if (localVariables == null) { - Map predVars = pred().variables(); - Map accumVars = accum().variables(); - localVariables = predVars.filter(accumVars::contains).asMap(Function.identity()); - } - return localVariables; - } - - @SuppressWarnings("rawtypes") - private Map variables; - - @SuppressWarnings("rawtypes") - @Override - protected Map variables() { - if (variables == null) { - Map predVars = pred().variables(); - Map accumVars = accum().variables(); - variables = Collection.concat(predVars.exclude(accumVars::contains), accumVars.exclude(predVars::contains)).asMap(Function.identity()); - } - return variables; - } - - private int identityIndex = -1; - - @SuppressWarnings("rawtypes") - private int identityIndex() { - if (identityIndex < 0) { - TermImpl accum = accum(); - for (int i = 1; i < accum.length(); i++) { - if (accum.get(i) instanceof TermImpl) { - Class rt = ((VarImpl) accum.get(resultIndex())).type(); - Class at = ((TermImpl) accum.get(i)).type(); - if (rt.isAssignableFrom(at)) { - identityIndex = i; - break; - } - } - } - } - return identityIndex; - } - - private int resultIndex = -1; - - @SuppressWarnings("rawtypes") - private int resultIndex() { - if (resultIndex < 0) { - TermImpl accum = accum(); - for (int i = 1; i < accum.length(); i++) { - if (accum.get(i) instanceof VarImpl && !localVariables().containsKey((VarImpl) accum.get(i))) { - resultIndex = i; - break; - } - } - } - return resultIndex; - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - @Override - protected Collection match(TermImpl goal, List der, Map> rec, Database database) { - Map localVars = ((CollectImpl) goal).localVariables(); - int ii = ((CollectImpl) goal).identityIndex(); - int ri = ((CollectImpl) goal).resultIndex(); - TermImpl goalPred = ((CollectImpl) goal).pred(); - TermImpl goalAccum = ((CollectImpl) goal).accum(); - TermImpl accum = accum(); - Set rs = Set.of(accum.getTerm(ii)); - Set inc = Set.of(); - for (TermImpl pm : ((TermImpl) pred().setBinding(localVars)).match(goalPred, der, rec, database)) { - if (pm.isIncomplete()) { - inc = inc.add(pm); - } else { - Map b = goalPred.getBinding(pm, Map.of()); - Set a = Set.of(); - for (TermImpl r : rs) { - TermImpl s = accum.setBinding(b).set(ii, r); - for (TermImpl am : ((TermImpl) s).match(goalAccum, der, rec, database)) { - if (am.isIncomplete()) { - inc = inc.add(am); - } else { - a = a.add(am); - } - } - } - rs = a.map(t -> t.getTerm(ri)).asSet(); - } - } - return Collection.concat(inc, rs.map(t -> set(2, accum.set(ri, t)))); - } - - @SuppressWarnings("rawtypes") - @Override - protected int termPrio(TermImpl goal, List der, Map> rec, Database database) { - return super.termPrio(goal, der, rec, database); - } - - @SuppressWarnings("rawtypes") - @Override - protected Map getBinding(TermImpl term, Map vars) { - Map localVars = localVariables(); - return super.getBinding(term, vars).exclude(e -> localVars.containsKey(e.getKey())).asMap(Function.identity()); - } - } - - // Rules - - public static interface Rule extends Term { - } - - private static final FunctImpl RULE_FUNCTOR = functImpl((SerializableBiFunction) Logic::rule, null); - private static final Functor RULE_FUNCTOR_PROXY = RULE_FUNCTOR.proxy(); - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Rule rule(Pred pred, Goal goal) { - RuleImpl ruleImpl = new RuleImpl(pred, goal); - TermImpl termImpl = Logic. unproxy(pred); - FunctImpl functor = termImpl.functor(); - Database database = DATABASE.get(); - database.rules.updateAndGet(m -> m.put(functor, ADD_RULE.apply(m.get(functor), ruleImpl))); - return ruleImpl.proxy(); - } - - private static final class RuleImpl extends TermImpl { - private static final long serialVersionUID = -4602043866952049391L; - - private RuleImpl(Term term, Goal goal) { - super(RULE_FUNCTOR_PROXY, term, goal); - } - - @SuppressWarnings("rawtypes") - private RuleImpl(TermImpl term, GoalImpl goal) { - super(RULE_FUNCTOR, term, goal); - } - - private RuleImpl(Object[] args) { - super(args); - } - - @Override - @SuppressWarnings("unchecked") - protected final Rule proxy() { - return (Rule) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Rule.class}, this); - } - - @SuppressWarnings("rawtypes") - protected final TermImpl term() { - return ((TermImpl) get(1)); - } - - @SuppressWarnings("rawtypes") - protected final GoalImpl goal() { - return ((GoalImpl) get(2)); - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - protected Set eval(TermImpl term, List der, Map> rec, Database database) { - TermImpl head = term(); - Map binding = head.getBinding(term, Map.of()); - if (binding == null) { - return Set.of(); - } - if (TRACE_LOGIC) { - System.err.println("!!!!!!!!!!!!!! " + " ".repeat(der.size()) + this + " " + binding.toString().substring(3)); - } - Collection> r = goal().eval(variables().putAll(binding), der, rec, database); - return r.map(m -> { - TermImpl it = (TermImpl) m.get(INCOMPLETE_VAR); - return it != null ? it : head.setBinding(m); - }).asSet(); - } - - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - protected RuleImpl term(Object[] array) { - return new RuleImpl(array); - } - - protected int rulePrio() { - return goal().goals().size(); - } - } - - // Goals - - public static interface Goal extends Term { - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static final FunctImpl GOAL_FUNCTOR = functImpl((SerializableFunction) Logic::goal, null); - private static final Functor GOAL_FUNCTOR_PROXY = GOAL_FUNCTOR.proxy(); - - private static GoalImpl getImpl(Goal goal) { - return Logic. unproxy(goal); - } - - public static boolean isTrue(Goal goal) { - return getImpl(goal).eval().anyMatch(e -> !e.containsKey(INCOMPLETE_VAR)); - } - - public static boolean isFalse(Goal goal) { - return getImpl(goal).eval().isEmpty(); - } - - public static boolean isIncomplete(Goal goal) { - return getImpl(goal).eval().anyMatch(e -> e.containsKey(INCOMPLETE_VAR)); - } - - @SuppressWarnings("rawtypes") - public static Set> getBindings(Goal goal) { - return getImpl(goal).eval().map(m -> m.asMap(e -> Entry.of((Variable) e.getKey().proxy(), proxy(e.getValue())))).asSet(); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Goal goal(Pred... goals) { - return new GoalImpl(list(goals)).proxy(); - } - - @SuppressWarnings("unchecked") - public static Goal goal(L goals) { - return new GoalImpl(goals).proxy(); - } - - private static final class GoalImpl extends TermImpl { - private static final long serialVersionUID = -4100263206389367132L; - - private GoalImpl(L goals) { - super(GOAL_FUNCTOR_PROXY, goals); - } - - @SuppressWarnings("rawtypes") - private GoalImpl(TermImpl goals) { - super(GOAL_FUNCTOR, goals); - } - - private GoalImpl(Object[] args) { - super(args); - } - - @Override - @SuppressWarnings("unchecked") - protected final Goal proxy() { - return (Goal) Proxy.newProxyInstance(type().getClassLoader(), new Class[]{Goal.class}, this); - } - - @Override - @SuppressWarnings({"unchecked", "rawtypes"}) - protected GoalImpl term(Object[] array) { - return new GoalImpl(array); - } - - @SuppressWarnings("rawtypes") - public Collection> eval() { - return eval(variables(), List.of(), Map.of(), DATABASE.get()); - } - - @SuppressWarnings("rawtypes") - protected Collection> eval(Map vars, List der, Map> rec, Database database) { - return eval(goals(), Set.of(vars), der, rec, database); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - protected List goals() { - return ((TermImpl) get(1)).list(); - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - private Collection> eval(List goals, Collection> vars, List der, Map> rec, Database database) { - if (goals.isEmpty()) { - return vars; - } - return vars.> flatMap(v -> { - if (v.containsKey(INCOMPLETE_VAR)) { - return Set.of(v); - } - List actual = List.of(); - for (TermImpl g : goals) { - actual = actual.add(g.setBinding(v)); - } - int i = first(actual, goals, der, rec, database); - TermImpl f = actual.get(i); - TermImpl g = goals.get(i); - Collection m = f.match(g, der, rec, database); - return eval(goals.removeIndex(i), m.> map(t -> { - if (t.type() == Incomplete.class) { - return Map.of(Entry.of(INCOMPLETE_VAR, t)); - } else { - Map b = g.getBinding(t, Map.of()); - return b == null ? Map.of() : v.putAll(b); - } - }), der, rec, database); - }); - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - private static int first(List actual, List goals, List der, Map> rec, Database database) { - int first = -1; - int min = Integer.MAX_VALUE; - for (int i = 0; i < actual.size(); i++) { - int prio = actual.get(i).termPrio(goals.get(i), der, rec, database); - if (first == -1 || prio < min) { - first = i; - min = prio; - } - } - return first; - } - } - - // Incomplete - - public interface Incomplete extends Term { - } - - @SuppressWarnings("rawtypes") - private static final FunctImpl INCOMPLETE_FUNCTOR = functImpl((SerializableFunction) Logic::incomplete, null); - private static final Functor INCOMPLETE_FUNCTOR_PROXY = INCOMPLETE_FUNCTOR.proxy(); - private static final VarImpl INCOMPLETE_VAR = new VarImpl(Incomplete.class, "I"); - private static final Incomplete INCOMPLETE_VAR_PROXY = INCOMPLETE_VAR.proxy(); - - @SuppressWarnings("unchecked") - public static Incomplete incompleteVar() { - return INCOMPLETE_VAR_PROXY; - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static TermImpl incomplete(List der) { - return incomplete(list(der)); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static TermImpl incomplete(TermImpl der) { - return termImpl(INCOMPLETE_FUNCTOR, der); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static Incomplete incomplete(L der) { - return term(INCOMPLETE_FUNCTOR_PROXY, der); - } - - // Equals - - @SuppressWarnings({"unchecked", "rawtypes"}) - private static Functor eq = functor(Logic::eq, t -> { - TermImpl at = t.getTerm(1); - TermImpl bt = t.getTerm(2); - if (at == null && bt == null) { - return t.incomplete(); - } else if (at == null) { - return Set.of(t.set(1, bt)); - } else if (bt == null) { - return Set.of(t.set(2, at)); - } else { - TermImpl eq = at.eq(bt); - return eq == null ? Set.of() : Set.of(t.set(1, eq).set(2, eq)); - } - }); - - public static Pred eq(Term a, Term b) { - return term(eq, a, b); - } - - // Facts - - @SuppressWarnings({"unchecked", "rawtypes"}) - public static void fact(Rel rel) { - Logic. unproxy(rel).makeFact(DATABASE.get()); - } - - // Is - - public static interface Atom extends Term { - - } - - public static interface Func extends Term { - - } - - @SuppressWarnings("rawtypes") - private static Functor is = functor((SerializableBiFunction) Logic::is); - - public static Pred is(T a, T b) { - return term(is, a, b); - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - public static void isRules() { - Atom A1 = var(Atom.class, "A1"); - Atom A2 = var(Atom.class, "A2"); - Func F1 = var(Func.class, "F1"); - Func F2 = var(Func.class, "F2"); - - rule(is(A1, A2), goal(eq(A1, A2))); - rule(is(F1, F2), goal(is(F2, A2), is(F1, A2))); - rule(is(A1, F1), goal(is(F1, A1))); - } - - // Bindings - - public static Map incomplete(Term... der) { - return Map.of(Entry.of((Variable) incompleteVar(), incomplete(list(der)).proxy())); - } - - public static Map binding(Term... varVal) { - Map b = Map.of(); - for (int i = 0; i < varVal.length; i += 2) { - b = b.add(Entry.of((Variable) varVal[i], varVal[i + 1])); - } - return b; - } - -} From 03c63a1bb0865e9110eb1b77c3159a7a4c329820 Mon Sep 17 00:00:00 2001 From: automation Date: Sun, 5 Jan 2025 13:45:06 +0000 Subject: [PATCH 145/179] [no-ci] updated by mvgplugin --- .github/dependabot.yml | 2 +- build.gradle.kts | 2 +- gradle.properties | 2 +- settings.gradle.kts | 2 +- .../org/modelingvalue/dclare/AbstractDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Action.java | 2 +- src/main/java/org/modelingvalue/dclare/ActionInstance.java | 2 +- src/main/java/org/modelingvalue/dclare/ActionTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Constant.java | 2 +- src/main/java/org/modelingvalue/dclare/ConstantState.java | 2 +- src/main/java/org/modelingvalue/dclare/Construction.java | 2 +- src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/DclareConfig.java | 2 +- src/main/java/org/modelingvalue/dclare/DclareTrace.java | 2 +- src/main/java/org/modelingvalue/dclare/Derivation.java | 2 +- .../java/org/modelingvalue/dclare/DerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Direction.java | 2 +- src/main/java/org/modelingvalue/dclare/Feature.java | 2 +- src/main/java/org/modelingvalue/dclare/FeatureModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/FixpointGroup.java | 2 +- src/main/java/org/modelingvalue/dclare/Getable.java | 2 +- src/main/java/org/modelingvalue/dclare/ILeafTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/IState.java | 2 +- src/main/java/org/modelingvalue/dclare/IdentityDerivation.java | 2 +- .../org/modelingvalue/dclare/IdentityDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Imperative.java | 2 +- .../java/org/modelingvalue/dclare/ImperativeTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/JsonToState.java | 2 +- src/main/java/org/modelingvalue/dclare/LazyDerivation.java | 2 +- .../org/modelingvalue/dclare/LazyDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Leaf.java | 2 +- src/main/java/org/modelingvalue/dclare/LeafModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/LeafTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/MatchInfo.java | 2 +- src/main/java/org/modelingvalue/dclare/Mutable.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableClass.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableState.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Newable.java | 2 +- src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java | 2 +- .../java/org/modelingvalue/dclare/NonInternableObserver.java | 2 +- src/main/java/org/modelingvalue/dclare/Observed.java | 2 +- src/main/java/org/modelingvalue/dclare/ObservedInstance.java | 2 +- src/main/java/org/modelingvalue/dclare/Observer.java | 2 +- src/main/java/org/modelingvalue/dclare/ObserverTrace.java | 2 +- src/main/java/org/modelingvalue/dclare/ObserverTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/OneShot.java | 2 +- src/main/java/org/modelingvalue/dclare/Priority.java | 2 +- src/main/java/org/modelingvalue/dclare/ReadOnly.java | 2 +- src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/ReusableTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Setable.java | 2 +- src/main/java/org/modelingvalue/dclare/SetableModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/State.java | 2 +- src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java | 2 +- src/main/java/org/modelingvalue/dclare/StateMap.java | 2 +- src/main/java/org/modelingvalue/dclare/StateMergeHandler.java | 2 +- src/main/java/org/modelingvalue/dclare/StateToJson.java | 2 +- src/main/java/org/modelingvalue/dclare/This.java | 2 +- src/main/java/org/modelingvalue/dclare/Transaction.java | 2 +- src/main/java/org/modelingvalue/dclare/TransactionClass.java | 2 +- src/main/java/org/modelingvalue/dclare/TransactionId.java | 2 +- src/main/java/org/modelingvalue/dclare/TypeWrapper.java | 2 +- src/main/java/org/modelingvalue/dclare/Universe.java | 2 +- src/main/java/org/modelingvalue/dclare/UniverseStatistics.java | 2 +- src/main/java/org/modelingvalue/dclare/UniverseTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java | 2 +- .../modelingvalue/dclare/ex/CycleInParentChainException.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java | 2 +- .../org/modelingvalue/dclare/ex/EmptyMandatoryException.java | 2 +- .../modelingvalue/dclare/ex/NoCurrentTransactionException.java | 2 +- .../org/modelingvalue/dclare/ex/NonDeterministicException.java | 2 +- .../org/modelingvalue/dclare/ex/NotYetDerivableException.java | 2 +- .../java/org/modelingvalue/dclare/ex/OutOfScopeException.java | 2 +- .../org/modelingvalue/dclare/ex/ReferencedOrphanException.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyChangesException.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyObservedException.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyObserversException.java | 2 +- .../java/org/modelingvalue/dclare/ex/TransactionException.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/Converters.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/JsonIC.java | 2 +- .../java/org/modelingvalue/dclare/sync/SerialisationPool.java | 2 +- .../java/org/modelingvalue/dclare/sync/SerializationHelper.java | 2 +- .../modelingvalue/dclare/sync/SerializationHelperWithPool.java | 2 +- .../org/modelingvalue/dclare/sync/SocketSyncConnection.java | 2 +- .../java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java | 2 +- .../org/modelingvalue/dclare/sync/SyncConnectionHandler.java | 2 +- .../org/modelingvalue/dclare/sync/UniverseSynchronizer.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/Util.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java | 2 +- .../java/org/modelingvalue/dclare/test/CommunicationTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/DclareTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/JsonICTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/NewableTests.java | 2 +- .../org/modelingvalue/dclare/test/SerialisationPoolTests.java | 2 +- .../modelingvalue/dclare/test/support/CommunicationHelper.java | 2 +- .../modelingvalue/dclare/test/support/CommunicationPeer.java | 2 +- .../java/org/modelingvalue/dclare/test/support/Fibonacci.java | 2 +- .../java/org/modelingvalue/dclare/test/support/ModelMaker.java | 2 +- .../org/modelingvalue/dclare/test/support/OneShotTests.java | 2 +- .../java/org/modelingvalue/dclare/test/support/PeerTester.java | 2 +- src/test/java/org/modelingvalue/dclare/test/support/Shared.java | 2 +- .../org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java | 2 +- .../java/org/modelingvalue/dclare/test/support/TestMutable.java | 2 +- .../org/modelingvalue/dclare/test/support/TestMutableClass.java | 2 +- .../java/org/modelingvalue/dclare/test/support/TestNewable.java | 2 +- .../org/modelingvalue/dclare/test/support/TestNewableClass.java | 2 +- .../org/modelingvalue/dclare/test/support/TestObserved.java | 2 +- .../org/modelingvalue/dclare/test/support/TestScheduler.java | 2 +- .../org/modelingvalue/dclare/test/support/TestUniverse.java | 2 +- 113 files changed, 113 insertions(+), 113 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ea7e9c02..49c8a9f2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ ## ~ ## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ ## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/build.gradle.kts b/build.gradle.kts index 02f98aa6..0ea5e6d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/gradle.properties b/gradle.properties index 56b71b4d..e9e5f23f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ ## ~ ## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ ## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/settings.gradle.kts b/settings.gradle.kts index eb29d1af..f521fe01 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 0ebf60e1..25c44842 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index c19f2e12..5cda0fd5 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ActionInstance.java b/src/main/java/org/modelingvalue/dclare/ActionInstance.java index 293c4150..c1c8573f 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ActionInstance.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 56a8b4dd..e5ef4070 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index 31ef100e..0ff59da6 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index ea9e9cca..8753d506 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Construction.java b/src/main/java/org/modelingvalue/dclare/Construction.java index eaad3d90..2fc5593c 100644 --- a/src/main/java/org/modelingvalue/dclare/Construction.java +++ b/src/main/java/org/modelingvalue/dclare/Construction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java b/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java index f5f65e53..37f99f26 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java index a7550995..136b5c73 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DclareConfig.java b/src/main/java/org/modelingvalue/dclare/DclareConfig.java index 5d741b29..b835ca90 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareConfig.java +++ b/src/main/java/org/modelingvalue/dclare/DclareConfig.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DclareTrace.java b/src/main/java/org/modelingvalue/dclare/DclareTrace.java index b126c564..a5ccce29 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareTrace.java +++ b/src/main/java/org/modelingvalue/dclare/DclareTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Derivation.java b/src/main/java/org/modelingvalue/dclare/Derivation.java index d58aaa65..42ad1cf7 100644 --- a/src/main/java/org/modelingvalue/dclare/Derivation.java +++ b/src/main/java/org/modelingvalue/dclare/Derivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java index 006ec7ae..75517cf5 100644 --- a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Direction.java b/src/main/java/org/modelingvalue/dclare/Direction.java index 91e1ad60..21645f10 100644 --- a/src/main/java/org/modelingvalue/dclare/Direction.java +++ b/src/main/java/org/modelingvalue/dclare/Direction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Feature.java b/src/main/java/org/modelingvalue/dclare/Feature.java index a4bb3ebf..0726a141 100644 --- a/src/main/java/org/modelingvalue/dclare/Feature.java +++ b/src/main/java/org/modelingvalue/dclare/Feature.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java index d0c8a2f3..67ab196f 100644 --- a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java +++ b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java index 81e707d0..f3b7a3c2 100644 --- a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java +++ b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Getable.java b/src/main/java/org/modelingvalue/dclare/Getable.java index 9aa4a622..eeb145e4 100644 --- a/src/main/java/org/modelingvalue/dclare/Getable.java +++ b/src/main/java/org/modelingvalue/dclare/Getable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java b/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java index afe7dee4..dd20f832 100644 --- a/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IState.java b/src/main/java/org/modelingvalue/dclare/IState.java index 61e85971..5d8d02fe 100644 --- a/src/main/java/org/modelingvalue/dclare/IState.java +++ b/src/main/java/org/modelingvalue/dclare/IState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java index 301b6755..75d36a65 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 3e94e2a7..6bb6cfee 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Imperative.java b/src/main/java/org/modelingvalue/dclare/Imperative.java index 34bd3c3b..1f8aba2a 100644 --- a/src/main/java/org/modelingvalue/dclare/Imperative.java +++ b/src/main/java/org/modelingvalue/dclare/Imperative.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index ad17dc39..321bfea7 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/JsonToState.java b/src/main/java/org/modelingvalue/dclare/JsonToState.java index d5c7c456..3d1cab4e 100644 --- a/src/main/java/org/modelingvalue/dclare/JsonToState.java +++ b/src/main/java/org/modelingvalue/dclare/JsonToState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java index 374d621a..43e5e09b 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java index c7998163..76092b2d 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Leaf.java b/src/main/java/org/modelingvalue/dclare/Leaf.java index 6824c1a8..7ad05b3d 100644 --- a/src/main/java/org/modelingvalue/dclare/Leaf.java +++ b/src/main/java/org/modelingvalue/dclare/Leaf.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LeafModifier.java b/src/main/java/org/modelingvalue/dclare/LeafModifier.java index 64ee7e13..af32abef 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/LeafModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index 4bb97445..20345164 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index 905c1e59..3ce34283 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index ea1115d7..79c54bd1 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableClass.java b/src/main/java/org/modelingvalue/dclare/MutableClass.java index 79419600..2c021d96 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableClass.java +++ b/src/main/java/org/modelingvalue/dclare/MutableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableState.java b/src/main/java/org/modelingvalue/dclare/MutableState.java index 7a278a66..d28bb0c2 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableState.java +++ b/src/main/java/org/modelingvalue/dclare/MutableState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index 086b73ae..cf6ed5ec 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Newable.java b/src/main/java/org/modelingvalue/dclare/Newable.java index c1a2ad08..fd689459 100644 --- a/src/main/java/org/modelingvalue/dclare/Newable.java +++ b/src/main/java/org/modelingvalue/dclare/Newable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java index 06f5b2cd..4c37f0a4 100644 --- a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java index 820d8fcc..a369194f 100644 --- a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Observed.java b/src/main/java/org/modelingvalue/dclare/Observed.java index e6c11ea4..6d697fb5 100644 --- a/src/main/java/org/modelingvalue/dclare/Observed.java +++ b/src/main/java/org/modelingvalue/dclare/Observed.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java index a9785839..b1752374 100644 --- a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index a1dee466..b55004f1 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 6c2eb57c..57845284 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 6a10fb2c..4d7e1d28 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 38a220fb..8bf20d7d 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Priority.java b/src/main/java/org/modelingvalue/dclare/Priority.java index 494c6f2b..9611bb33 100644 --- a/src/main/java/org/modelingvalue/dclare/Priority.java +++ b/src/main/java/org/modelingvalue/dclare/Priority.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnly.java b/src/main/java/org/modelingvalue/dclare/ReadOnly.java index 3f0a17b2..55bf3c79 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnly.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnly.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index 65d6c802..4776c5fb 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java index 83835dbf..6a216e7b 100644 --- a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index 20a1d6e3..1e821f85 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/SetableModifier.java b/src/main/java/org/modelingvalue/dclare/SetableModifier.java index 7a37b47e..eb0181c7 100644 --- a/src/main/java/org/modelingvalue/dclare/SetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/SetableModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index edf79c27..3c779edd 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java index aa1a7982..85df0428 100644 --- a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateMap.java b/src/main/java/org/modelingvalue/dclare/StateMap.java index c3a10042..3cd09040 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMap.java +++ b/src/main/java/org/modelingvalue/dclare/StateMap.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java index dbdae609..1791e3ac 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index b9894234..847a967d 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/This.java b/src/main/java/org/modelingvalue/dclare/This.java index c7ba7141..24914670 100644 --- a/src/main/java/org/modelingvalue/dclare/This.java +++ b/src/main/java/org/modelingvalue/dclare/This.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Transaction.java b/src/main/java/org/modelingvalue/dclare/Transaction.java index 68bb2525..3f4af914 100644 --- a/src/main/java/org/modelingvalue/dclare/Transaction.java +++ b/src/main/java/org/modelingvalue/dclare/Transaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TransactionClass.java b/src/main/java/org/modelingvalue/dclare/TransactionClass.java index ebe6453a..4562ff8e 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionClass.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TransactionId.java b/src/main/java/org/modelingvalue/dclare/TransactionId.java index 7f70acf5..edbd07ed 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionId.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionId.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java index 2a344061..90624f8e 100644 --- a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java +++ b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index 815852d4..e8badb9d 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java index 7f10f98e..b413c996 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 75de340a..013dc1aa 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java index 06db1e62..1719b0b7 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java index 8946f850..017f0b52 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java index 24c94828..8c5aff09 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java index c2da64c4..673760f0 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java index 55304501..fa49dfcb 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java index 640cd8e1..6d278c9b 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java index c77f1097..44269a1b 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java index 00c234b5..9b290779 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java index 81e83df3..bf93cf0c 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java index d999e1e7..2e471c4a 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java index a7f86b8a..0543262d 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java index 8f3a8891..d8f99a1f 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java index 300f3684..46714b68 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java index 9312f5d0..aca1754c 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/Converters.java b/src/main/java/org/modelingvalue/dclare/sync/Converters.java index 40126939..cf086944 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Converters.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Converters.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java index e6a0d18d..4ae64aed 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java +++ b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java index 850c846c..e4eb970b 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java +++ b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java index 3bc58659..5662518a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java index 4824d3e2..806722b8 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java index 51d88799..1070086c 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java index cbc55e8a..95031fd0 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java index 5bb854c9..4a2790ff 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java index e6708865..addc9518 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java index 775b7b55..902ea775 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/Util.java b/src/main/java/org/modelingvalue/dclare/sync/Util.java index 86d8c59a..d0801c38 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Util.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Util.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java index e19ce203..2020d963 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java +++ b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java index 209b68b3..e6533a8a 100644 --- a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java index c66b7209..eba08ded 100644 --- a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java index ff314448..a2effcab 100644 --- a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java index 520f44b0..71347ed4 100644 --- a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java index e0fee763..9a4f8dcb 100644 --- a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java index 9407541b..6d2e21dd 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java index af963b01..3747156f 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java index 8c6812a8..6461d29e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index 3cbb5f2d..cfe55cf2 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java index d1f801c9..990c6ec5 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java index f828e143..a8ee8e95 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java index d2361a59..9128f2be 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java index af432bf7..74286a9f 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java index 36d6340a..dc11848b 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java index b9f25ed5..c29f7c59 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java index 1036a401..9898a970 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java index a655b961..f4136d54 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java index eb9dcce1..dd7fd436 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java index e6a7f026..d6f3dfe4 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java index d61d8f36..079329ba 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2024 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ From 206baf7cc6941e6864b53f29bf6502b52e7253ff Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 23 Jan 2025 14:29:37 +0100 Subject: [PATCH 146/179] NULL -> null --- src/main/java/org/modelingvalue/dclare/ConstantState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 8753d506..10fe9875 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -177,7 +177,7 @@ public V getOrSet(ILeafTransaction cch, O object, Constant constant, V if (ist == null) { ist = set(cch, object, constant, prev, soll == null ? (V) NULL : soll, false); } - return ist; + return ist == NULL ? null : ist; } @SuppressWarnings("unchecked") From 73b81eb93bf250df055a68476c7f986374d649c5 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 25 Feb 2025 11:22:07 +0100 Subject: [PATCH 147/179] pushNow --- .../java/org/modelingvalue/dclare/Mutable.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 79c54bd1..5f89b129 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -187,6 +187,23 @@ default void dDeactivate(LeafTransaction tx) { } } + @SuppressWarnings({"rawtypes", "unchecked"}) + default void pushNow() { + AbstractDerivationTransaction tx = (AbstractDerivationTransaction) LeafTransaction.getCurrent(); + try { + MutableClass dClass = dClass(); + Set containments = MutableClass.D_CONTAINMENTS.get(dClass); + Set children = containments.flatMap(s -> s. getCollection(this)).asSet(); + children.forEach(m -> m.pushNow()); + Set nonDerivers = MutableClass.D_NON_DERIVERS.get(dClass).filter(d -> d.direction().isLazy()).asSet(); + nonDerivers.forEach(o -> tx.runDeriver(this, null, o, 0)); + Set observeds = MutableClass.D_PUSH_IF_PULL.get(dClass); + observeds.forEach(o -> o.get(this)); + } catch (Throwable t) { + tx.universeTransaction().handleException(t); + } + } + MutableClass dClass(); @SuppressWarnings("rawtypes") From 879b76353bf236b63d8cb006be9169ef15ff929f Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 3 Mar 2025 14:29:23 +0100 Subject: [PATCH 148/179] ignore exceptions in IdentityDerivationTransaction --- .../dclare/AbstractDerivationTransaction.java | 7 ++++++- .../dclare/IdentityDerivationTransaction.java | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 25c44842..819f8093 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -160,12 +160,17 @@ protected void runDeriver(Mutable mutable, Observed observed, Observer observer, if (isTraceDerivation(mutable, observed)) { runSilent(() -> System.err.println(tracePre(mutable, this) + "!!!! " + mutable + "." + observer + "() => THROWS " + t)); } - universeTransaction().handleException(new TransactionException(mutable, new TransactionException(observer, t))); + handleException(mutable, observer, t); } })); } + @SuppressWarnings("rawtypes") + protected void handleException(Mutable mutable, Observer observer, Throwable t) { + universeTransaction().handleException(new TransactionException(mutable, new TransactionException(observer, t))); + } + @Override public T set(O object, Setable setable, BiFunction function, E element) { T nonDerived = getNonDerived(object, setable); diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 6bb6cfee..042f919a 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -84,6 +84,12 @@ protected boolean isTraceDerivation(O object, Setable setable) { return super.isTraceDerivation(object, setable) && (universeTransaction().getConfig().isTraceMatching() || memoization(object) != memoization()); } + @SuppressWarnings("rawtypes") + @Override + protected void handleException(Mutable mutable, Observer observer, Throwable t) { + // Ignore + } + @Override protected String getCurrentTypeForTrace() { return "ID"; From 7dcee856ea233d59188655a4dcc4a1f57067ee36 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 6 Mar 2025 16:05:50 +0100 Subject: [PATCH 149/179] defer exception handling when deriving identities --- .../modelingvalue/dclare/IdentityDerivationTransaction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 042f919a..4650ac5b 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -87,7 +87,9 @@ protected boolean isTraceDerivation(O object, Setable setable) { @SuppressWarnings("rawtypes") @Override protected void handleException(Mutable mutable, Observer observer, Throwable t) { - // Ignore + if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } } @Override From ddc4d77f2c2114c54693a8277b9c7401f7b33d17 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 20 Mar 2025 14:20:55 +0100 Subject: [PATCH 150/179] reverse handling --- .../dclare/AbstractDerivationTransaction.java | 2 +- .../dclare/IdentityDerivationTransaction.java | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 819f8093..8b0b17f4 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -167,7 +167,7 @@ protected void runDeriver(Mutable mutable, Observed observed, Observer observer, } @SuppressWarnings("rawtypes") - protected void handleException(Mutable mutable, Observer observer, Throwable t) { + protected final void handleException(Mutable mutable, Observer observer, Throwable t) { universeTransaction().handleException(new TransactionException(mutable, new TransactionException(observer, t))); } diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 4650ac5b..6bb6cfee 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -84,14 +84,6 @@ protected boolean isTraceDerivation(O object, Setable setable) { return super.isTraceDerivation(object, setable) && (universeTransaction().getConfig().isTraceMatching() || memoization(object) != memoization()); } - @SuppressWarnings("rawtypes") - @Override - protected void handleException(Mutable mutable, Observer observer, Throwable t) { - if (t instanceof RuntimeException) { - throw (RuntimeException) t; - } - } - @Override protected String getCurrentTypeForTrace() { return "ID"; From 79215c492bc8cc6ab2d5a706d6b3d94104492514 Mon Sep 17 00:00:00 2001 From: WimBast Date: Mon, 24 Mar 2025 11:16:48 +0100 Subject: [PATCH 151/179] ignore exceptions in Identity derivation --- .../modelingvalue/dclare/AbstractDerivationTransaction.java | 2 +- .../modelingvalue/dclare/IdentityDerivationTransaction.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 8b0b17f4..819f8093 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -167,7 +167,7 @@ protected void runDeriver(Mutable mutable, Observed observed, Observer observer, } @SuppressWarnings("rawtypes") - protected final void handleException(Mutable mutable, Observer observer, Throwable t) { + protected void handleException(Mutable mutable, Observer observer, Throwable t) { universeTransaction().handleException(new TransactionException(mutable, new TransactionException(observer, t))); } diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index 6bb6cfee..b97913a2 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -88,4 +88,10 @@ protected boolean isTraceDerivation(O object, Setable setable) { protected String getCurrentTypeForTrace() { return "ID"; } + + @Override + @SuppressWarnings("rawtypes") + protected void handleException(Mutable mutable, Observer observer, Throwable t) { + // Ignore: Will result in missing matches in complex identity situations, hence, less incremental + } } From 7c45ad1ea13768ad0dab141cac72918107f7e012 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 27 Mar 2025 13:29:18 +0100 Subject: [PATCH 152/179] Atomic Derived --- .../dclare/AbstractDerivationTransaction.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 819f8093..46940f98 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -21,6 +21,7 @@ package org.modelingvalue.dclare; import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiFunction; import java.util.function.Supplier; import java.util.function.UnaryOperator; @@ -330,29 +331,31 @@ public int depth() { } protected static class Derived extends Pair> { - private static final long serialVersionUID = -2566539820227398813L; + private static final long serialVersionUID = -2566539820227398813L; @SuppressWarnings("rawtypes") - private final Derived outer; - private T value; + private final Derived outer; + private final AtomicReference value; @SuppressWarnings("rawtypes") protected Derived(O a, Observed b, Derived outer) { super(a, b); this.outer = outer; + this.value = new AtomicReference<>(); } protected T get() { + T value = this.value.get(); return value == ConstantState.NULL ? null : value; } @SuppressWarnings("unchecked") protected void set(T value) { - this.value = value == null ? (T) ConstantState.NULL : value; + this.value.set(value == null ? (T) ConstantState.NULL : value); } protected boolean isSet() { - return value != null; + return this.value.get() != null; } protected boolean isDerived(Object object, Observed observed) { From 0776b7fd5a6b43c53bb22d59ce85efdea87dfac2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 15 May 2025 09:56:44 +0200 Subject: [PATCH 153/179] not only lazy when pushNow on Mutable --- src/main/java/org/modelingvalue/dclare/Mutable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index 5f89b129..7092d857 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -195,7 +195,7 @@ default void pushNow() { Set containments = MutableClass.D_CONTAINMENTS.get(dClass); Set children = containments.flatMap(s -> s. getCollection(this)).asSet(); children.forEach(m -> m.pushNow()); - Set nonDerivers = MutableClass.D_NON_DERIVERS.get(dClass).filter(d -> d.direction().isLazy()).asSet(); + Set nonDerivers = MutableClass.D_NON_DERIVERS.get(dClass).asSet(); nonDerivers.forEach(o -> tx.runDeriver(this, null, o, 0)); Set observeds = MutableClass.D_PUSH_IF_PULL.get(dClass); observeds.forEach(o -> o.get(this)); From 4af77d6a0cc85fcd0e3db19d17d1e58ed6b04f55 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 15 May 2025 16:14:47 +0200 Subject: [PATCH 154/179] get Setable -> getRaw --- .../dclare/ActionTransaction.java | 6 +-- .../dclare/ImperativeTransaction.java | 4 +- .../org/modelingvalue/dclare/Mutable.java | 6 +-- .../modelingvalue/dclare/MutableState.java | 2 +- .../dclare/MutableTransaction.java | 2 +- .../dclare/ObserverTransaction.java | 2 +- .../org/modelingvalue/dclare/Setable.java | 2 +- .../java/org/modelingvalue/dclare/State.java | 2 +- .../org/modelingvalue/dclare/StateMap.java | 5 --- .../org/modelingvalue/dclare/StateToJson.java | 44 +++++++++---------- .../dclare/UniverseTransaction.java | 2 +- .../dclare/test/DclareTests.java | 34 +++++++------- .../dclare/test/support/ModelMaker.java | 20 ++++----- 13 files changed, 61 insertions(+), 70 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index e5ef4070..5af2f54c 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -158,18 +158,18 @@ protected void rollback() { @Override public T set(O object, Setable property, BiFunction function, E element) { - return set(object, property, function.apply(currentState.get().get(object, property), element)); + return set(object, property, function.apply(currentState.get().getRaw(object, property), element)); } @Override public T set(O object, Setable property, UnaryOperator oper) { - return set(object, property, oper.apply(currentState.get().get(object, property))); + return set(object, property, oper.apply(currentState.get().getRaw(object, property))); } @Override public T set(O object, Setable property, T post) { property.init(post); - T pre = state().get(object, property); + T pre = state().getRaw(object, property); set(object, property, pre, post); return pre; } diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 321bfea7..9ad05ef9 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -117,7 +117,7 @@ public MutableState mutableState() { public final boolean commit(State dclare, boolean timeTraveling) { commiting = true; - boolean insync = setted.isEmpty() && dclare.get(this, CHANGE_NR).equals(state.get(this, CHANGE_NR)); + boolean insync = setted.isEmpty() && dclare.getRaw(this, CHANGE_NR).equals(state.getRaw(this, CHANGE_NR)); if (preState() != dclare) { dclare2imper(dclare, timeTraveling, insync); } @@ -185,7 +185,7 @@ private Action changeAction(State imper, DefaultMap dAllDerivations() { default boolean dBecameOrphan() { LeafTransaction tx = LeafTransaction.getCurrent(); return tx.preStartState(Priority.OUTER).getRaw(this, Mutable.D_PARENT_CONTAINING) != null && // - tx.state().get(this, Mutable.D_PARENT_CONTAINING) == null; + tx.state().getRaw(this, Mutable.D_PARENT_CONTAINING) == null; } default void dChangedParentContaining(Pair> pre, Pair> post) { @@ -242,7 +242,7 @@ default MutableTransaction newTransaction(UniverseTransaction universeTransactio @Override default State run(State state, MutableTransaction parent) { - Pair> pair = state.get(this, D_PARENT_CONTAINING); + Pair> pair = state.getRaw(this, D_PARENT_CONTAINING); if (pair != null && parent.mutable().equals(pair.a())) { return TransactionClass.super.run(state, parent); } else { @@ -266,7 +266,7 @@ default boolean dCheckConsistency() { } default boolean dIsOrphan(State state) { - return state.get(this, D_PARENT_CONTAINING) == null; + return state.getRaw(this, D_PARENT_CONTAINING) == null; } default ConstantState dMemoization(AbstractDerivationTransaction tx) { diff --git a/src/main/java/org/modelingvalue/dclare/MutableState.java b/src/main/java/org/modelingvalue/dclare/MutableState.java index d28bb0c2..74f3409f 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableState.java +++ b/src/main/java/org/modelingvalue/dclare/MutableState.java @@ -136,7 +136,7 @@ private State setChanged(State state, Mutable changed) { } private State setChanged(State state, Mutable changed, TransactionId txid) { - while (changed != null && !(changed instanceof Universe) && state.get(changed, Mutable.D_CHANGE_ID) != txid) { + while (changed != null && !(changed instanceof Universe) && state.getRaw(changed, Mutable.D_CHANGE_ID) != txid) { state = state.set(changed, Mutable.D_CHANGE_ID, txid); changed = state.getA(changed, Mutable.D_PARENT_CONTAINING); } diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index cf6ed5ec..4579064a 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -64,7 +64,7 @@ public final Mutable mutable() { } protected boolean hasQueued(State state, Mutable object, Priority prio) { - return !state.get(object, state.actions(prio)).isEmpty() || !state.get(object, state.children(prio)).isEmpty(); + return !state.getRaw(object, state.actions(prio)).isEmpty() || !state.getRaw(object, state.children(prio)).isEmpty(); } private void move(Mutable object, Priority from, Priority to) { diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 4d7e1d28..c329dcfa 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -229,7 +229,7 @@ private ObserverTrace trace(State pre, DefaultMap> observ ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), nrOfChanges, // observeds.filter(e -> !e.getKey().isPlumbing()).flatMap(e -> e.getValue().map(m -> { m = m.dResolve(mutable()); - return Entry.of(ObservedInstance.of(m, e.getKey()), pre.get(m, e.getKey())); + return Entry.of(ObservedInstance.of(m, e.getKey()), pre.getRaw(m, e.getKey())); })).asMap(e -> e), // pre.diff(current(), o -> o instanceof Mutable, s -> s instanceof Observed && !s.isPlumbing()).// flatMap(e1 -> e1.getValue().map(e2 -> Entry.of(ObservedInstance.of((Mutable) e1.getKey(), (Observed) e2.getKey()), e2.getValue().b()))).asMap(e -> e)); diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index 1e821f85..8ccc05bf 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -375,7 +375,7 @@ public Set checkConsistency(State state, O object, T post) { } } if (scope != null) { - Set s = state.get(object, scope.get()); + Set s = state.getRaw(object, scope.get()); if (post instanceof ContainingCollection) { if (!s.containsAll((ContainingCollection) post)) { errors = errors.add(new OutOfScopeException(object, this, post, s)); diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index 3c779edd..6a8e5c30 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -397,7 +397,7 @@ public UniverseTransaction universeTransaction() { @Override public TransactionId transactionId() { - return get(universeTransaction.universe(), Mutable.D_CHANGE_ID); + return getRaw(universeTransaction.universe(), Mutable.D_CHANGE_ID); } @Override diff --git a/src/main/java/org/modelingvalue/dclare/StateMap.java b/src/main/java/org/modelingvalue/dclare/StateMap.java index 3cd09040..363403fa 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMap.java +++ b/src/main/java/org/modelingvalue/dclare/StateMap.java @@ -146,11 +146,6 @@ public String toString() { }).collect(Collectors.joining("\n")); } - @SuppressWarnings("unchecked") - public T get(O obj, Setable settable) { - return (T) map.get(obj).get(settable); - } - public StateMap clear(O obj, Setable settable) { return new StateMap(map.put(obj, map.get(obj).removeKey(settable))); } diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index 847a967d..a7cdaf4a 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -36,9 +36,9 @@ @SuppressWarnings({"rawtypes", "unused"}) public class StateToJson extends ToJson { - public static final String ID_FIELD_NAME = "@id"; - public static final String ID_REF_FIELD_NAME = "@idref"; - public static final String NAME_FIELD_NAME = "name"; + public static final String ID_FIELD_NAME = "@id"; + public static final String ID_REF_FIELD_NAME = "@idref"; + public static final String NAME_FIELD_NAME = "name"; private static final Comparator> FIELD_SORTER = ((Comparator>) (e1, e2) -> isNameOrId(e1) ? -1 : isNameOrId(e2) ? +1 : 0).thenComparing(e -> e.getKey().toString()); private static boolean isNameOrId(Entry e) { @@ -98,31 +98,27 @@ protected Iterator> getMapIterator(Object o) { protected Map getMapIterator_Mutable(Mutable mutable) { Predicate setableFilter = getSetableFilter(); - return mutable.dClass() - .dSetables() // - .map((Setable setable) -> { - if (!setableFilter.test(setable)) { - return null; - } - @SuppressWarnings("unchecked") - Object value = state.get(mutable, setable); - @SuppressWarnings("unchecked") - Object defValue = setable.getDefault(mutable); - if (Objects.equals(value, defValue)) { - return null; - } - return org.modelingvalue.collections.Entry.of((Object) renderTag(setable), renderValue(mutable, setable, value)); - }) // - .filter(Objects::nonNull) // - .asMap(e -> e) - .toMutable(); + return mutable.dClass().dSetables() // + .map((Setable setable) -> { + if (!setableFilter.test(setable)) { + return null; + } + @SuppressWarnings("unchecked") + Object value = state.getRaw(mutable, setable); + @SuppressWarnings("unchecked") + Object defValue = setable.getDefault(mutable); + if (Objects.equals(value, defValue)) { + return null; + } + return org.modelingvalue.collections.Entry.of((Object) renderTag(setable), renderValue(mutable, setable, value)); + }) // + .filter(Objects::nonNull) // + .asMap(e -> e).toMutable(); } @SuppressWarnings("unchecked") protected Map getMapIterator_QualifiedSet(QualifiedSet qualifiedSet) { - return qualifiedSet.toKeys() - .asMap(k -> org.modelingvalue.collections.Entry.of(k, qualifiedSet.get(k))) - .toMutable(); + return qualifiedSet.toKeys().asMap(k -> org.modelingvalue.collections.Entry.of(k, qualifiedSet.get(k))).toMutable(); } @SuppressWarnings("unchecked") diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 013dc1aa..c6639518 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -643,7 +643,7 @@ protected void clearOrphans(Universe universe) { } public boolean isStopped(State state) { - return state.get(universe(), STOPPED); + return state.getRaw(universe(), STOPPED); } public void put(Object id, Runnable action) { diff --git a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java index eba08ded..0b270e38 100644 --- a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java @@ -77,8 +77,8 @@ public void source2target() { State result = assertDoesNotThrow(() -> universe.waitForEnd(universeTransaction)); printState(universeTransaction, result); - assertEquals(10, (int) result.get(object, source)); - assertEquals(10, (int) result.get(object, target)); + assertEquals(10, (int) result.getRaw(object, source)); + assertEquals(10, (int) result.getRaw(object, target)); } @RepeatedTest(32) @@ -96,8 +96,8 @@ public void simpleBiDirectional() { State result = assertDoesNotThrow(() -> universe.waitForEnd(universeTransaction)); printState(universeTransaction, result); - assertEquals(10, (int) result.get(object, source)); - assertEquals(10, (int) result.get(object, target)); + assertEquals(10, (int) result.getRaw(object, source)); + assertEquals(10, (int) result.getRaw(object, target)); } @Test @@ -126,7 +126,7 @@ public void derivationChain() { State result = assertDoesNotThrow(() -> universe.waitForEnd(universeTransaction)); printState(universeTransaction, result); - assertEquals(length, (int) result.get(TestMutable.of(length - 1, clazz), total)); + assertEquals(length, (int) result.getRaw(TestMutable.of(length - 1, clazz), total)); } static final Observed next = Observed.of("next", null, () -> DclareTests.previous); @@ -156,7 +156,7 @@ public void opposites() { universeTransaction.stop(); State result = assertDoesNotThrow(() -> universe.waitForEnd(universeTransaction)); - assertEquals(TestMutable.of(11, clazz), result.get(TestMutable.of(10, clazz), next)); + assertEquals(TestMutable.of(11, clazz), result.getRaw(TestMutable.of(10, clazz), next)); printState(universeTransaction, result); } @@ -199,9 +199,9 @@ public void moveAndRemove() { State result = assertDoesNotThrow(() -> universe.waitForEnd(universeTransaction)); printState(universeTransaction, result); - assertEquals(Set.of(), result.get(c1, children)); - assertNull(result.get(ggc6, qualifiedName)); - assertEquals("u.c2.gc2.ggc3", result.get(ggc3, qualifiedName)); + assertEquals(Set.of(), result.getRaw(c1, children)); + assertNull(result.getRaw(ggc6, qualifiedName)); + assertEquals("u.c2.gc2.ggc3", result.getRaw(ggc3, qualifiedName)); } @Test @@ -270,15 +270,15 @@ public void moodTest() { state = universeTransaction.waitForIdle(); printState(universeTransaction, state); - assertNull(state.get(universe, child)); + assertNull(state.getRaw(universe, child)); state = universeTransaction.putAndWaitForIdle("inject1", () -> child.set(universe, child1)); printState(universeTransaction, state); - assertEquals(child1, state.get(universe, child)); + assertEquals(child1, state.getRaw(universe, child)); state = universeTransaction.putAndWaitForIdle("inject2", () -> child.set(universe, child2)); printState(universeTransaction, state); - assertEquals(child2, state.get(universe, child)); + assertEquals(child2, state.getRaw(universe, child)); universeTransaction.stop(); state = universeTransaction.waitForStopped(); @@ -339,13 +339,13 @@ public void rippleOutTest() { State result = assertDoesNotThrow(() -> universe.waitForEnd(universeTransaction)); printState(universeTransaction, result); - List before = result.get(universe, begin); - List after = result.get(universe, end); - List list = result.get(universe, children); + List before = result.getRaw(universe, begin); + List after = result.getRaw(universe, end); + List list = result.getRaw(universe, children); assertEquals(List.of(one, two), list); assertEquals(List.of(one), before); assertEquals(List.of(two), after); - assertEquals(false, result.get(one, property)); - assertEquals(true, result.get(two, property)); + assertEquals(false, result.getRaw(one, property)); + assertEquals(true, result.getRaw(two, property)); } } diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index cfe55cf2..232899c7 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -253,42 +253,42 @@ public void setXyzzy_source(int i) { } public int getXyzzy_source() { - return tx.currentState().get(xyzzy, source); + return tx.currentState().getRaw(xyzzy, source); } public int getXyzzy_target() { - return tx.currentState().get(xyzzy, target); + return tx.currentState().getRaw(xyzzy, target); } public int getXyzzy_target2() { - return tx.currentState().get(xyzzy, target2); + return tx.currentState().getRaw(xyzzy, target2); } public List getXyzzy_aList() { - return tx.currentState().get(xyzzy, aList); + return tx.currentState().getRaw(xyzzy, aList); } public Set getXyzzy_aSet() { - return tx.currentState().get(xyzzy, aSet); + return tx.currentState().getRaw(xyzzy, aSet); } public Set getXyzzy_extraSet() { - return tx.currentState().get(xyzzy, extraSet); + return tx.currentState().getRaw(xyzzy, extraSet); } public Map getXyzzy_aMap() { - return tx.currentState().get(xyzzy, aMap); + return tx.currentState().getRaw(xyzzy, aMap); } public DefaultMap getXyzzy_aDefMap() { - return tx.currentState().get(xyzzy, aDefMap); + return tx.currentState().getRaw(xyzzy, aDefMap); } public QualifiedSet getXyzzy_aQuaSet() { - return tx.currentState().get(xyzzy, aQuaSet); + return tx.currentState().getRaw(xyzzy, aQuaSet); } public TestMutable getXyzzy_extra() { - return tx.currentState().get(xyzzy, extra); + return tx.currentState().getRaw(xyzzy, extra); } } From 97dcb1b89b380cb99e94fde1527a55db9d09c9ff Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 15 May 2025 16:33:12 +0200 Subject: [PATCH 155/179] stackoverflow fix --- src/main/java/org/modelingvalue/dclare/State.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index 6a8e5c30..f4cff558 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -402,7 +402,7 @@ public TransactionId transactionId() { @Override public T getRaw(O object, Getable property) { - return get(object, property); + return super.get(object, property); } @Override From 4135d02be116a3f0ca5dc7d114a2c599e7a42220 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 15 May 2025 16:41:17 +0200 Subject: [PATCH 156/179] get iso getRaw for tracing --- src/main/java/org/modelingvalue/dclare/ObserverTransaction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index c329dcfa..4d7e1d28 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -229,7 +229,7 @@ private ObserverTrace trace(State pre, DefaultMap> observ ObserverTrace trace = new ObserverTrace(mutable(), observer(), traces.last(), nrOfChanges, // observeds.filter(e -> !e.getKey().isPlumbing()).flatMap(e -> e.getValue().map(m -> { m = m.dResolve(mutable()); - return Entry.of(ObservedInstance.of(m, e.getKey()), pre.getRaw(m, e.getKey())); + return Entry.of(ObservedInstance.of(m, e.getKey()), pre.get(m, e.getKey())); })).asMap(e -> e), // pre.diff(current(), o -> o instanceof Mutable, s -> s instanceof Observed && !s.isPlumbing()).// flatMap(e1 -> e1.getValue().map(e2 -> Entry.of(ObservedInstance.of((Mutable) e1.getKey(), (Observed) e2.getKey()), e2.getValue().b()))).asMap(e -> e)); From c9b9adc74d2a94ac083aae8449b1876289a6aa07 Mon Sep 17 00:00:00 2001 From: WimBast Date: Tue, 20 May 2025 11:23:00 +0200 Subject: [PATCH 157/179] derivation tracing --- .../dclare/AbstractDerivationTransaction.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 46940f98..2066ec7d 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -151,7 +151,7 @@ private T derive(O object, Getable getable, T nonDerived) { @SuppressWarnings({"rawtypes", "unchecked"}) protected void runDeriver(Mutable mutable, Observed observed, Observer observer, int i) { - if (isTraceDerivation(mutable, observed)) { + if (isTraceDerivation(mutable, observed) || observer.isTracing()) { runSilent(() -> System.err.println(tracePre(mutable, this) + String.format(">>%d> ", i) + mutable + "." + observer + "()")); } INDENT.run(INDENT.get() + 1, () -> DERIVER.run(Pair.of(mutable, observer), () -> { @@ -218,9 +218,9 @@ private T set(O object, Setable setable, T post, T nonDerived) { } else { setInMemoization(mem, object, observed, result, false); } - if (isTraceDerivation(object, observed)) { + Pair deriver = DERIVER.get(); + if (isTraceDerivation(object, observed) || (deriver != null && deriver.b().isTracing())) { runSilent(() -> { - Pair deriver = DERIVER.get(); if (deriver != null) { System.err.println(tracePre(object, this) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); } else { @@ -301,6 +301,11 @@ public O construct(Reason reason, Supplier supplier) { Construction cons = Construction.of(deriver.a(), deriver.b(), reason); setInMemoization(memoization(deriver.a()), result, Newable.D_ALL_DERIVATIONS, Newable.D_ALL_DERIVATIONS.getDefault(result).add(cons), true); Mutable.D_INITIAL_CONSTRUCTION.force(result, cons); + if (isTraceDerivation(deriver.a(), null) || deriver.b().isTracing()) { + runSilent(() -> { + System.err.println(tracePre(deriver.a(), this) + "CON " + deriver.a() + "." + deriver.b() + "(" + cons.reason() + "->" + result + ")"); + }); + } return result; } From 4a89483617dfd009344b797fb8aaa3ac130f8ac2 Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 22 May 2025 10:28:07 +0200 Subject: [PATCH 158/179] check in doDeriveSet --- .../dclare/AbstractDerivationTransaction.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 2066ec7d..37f6d1f5 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -76,7 +76,7 @@ protected boolean doDeriveGet(O object, Getable getable, T nonDeriv @SuppressWarnings("rawtypes") protected boolean doDeriveSet(O object, Getable getable, T nonDerived) { - return object instanceof Mutable && getable instanceof Observed && isDeriving(); + return object instanceof Mutable && getable instanceof Observed && DERIVER.get() != null; } protected T getNonDerived(O object, Getable getable) { @@ -219,13 +219,9 @@ private T set(O object, Setable setable, T post, T nonDerived) { setInMemoization(mem, object, observed, result, false); } Pair deriver = DERIVER.get(); - if (isTraceDerivation(object, observed) || (deriver != null && deriver.b().isTracing())) { + if (isTraceDerivation(object, observed) || deriver.b().isTracing()) { runSilent(() -> { - if (deriver != null) { - System.err.println(tracePre(object, this) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); - } else { - System.err.println(tracePre(object, this) + "SET (" + object + "." + observed + "=" + pre + "->" + result + ")"); - } + System.err.println(tracePre(object, this) + "SET " + deriver.a() + "." + deriver.b() + "(" + object + "." + observed + "=" + pre + "->" + result + ")"); }); } if (observed.containment()) { From ea80d71ce723c5a976c2bcce608b091795f1f45a Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Thu, 22 May 2025 19:31:01 +0200 Subject: [PATCH 159/179] update --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d766c58b..40ab4a71 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,7 @@ on: [ push, workflow_dispatch ] jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[no-ci]')" env: ALLREP_TOKEN: "${{secrets.ALLREP_TOKEN}}" From f7706bacb932bcb239221fc549b2432877fe0383 Mon Sep 17 00:00:00 2001 From: Jeroen Thunnissen Date: Sat, 24 May 2025 15:26:56 +0200 Subject: [PATCH 160/179] ignore vscode --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ef8b1b21..9e7dc34d 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,9 @@ tmp/ tmp/** tmp/**/* +#### vscode +.vscode/ + #### java (https://github.com/github/gitignore/blob/master/Java.gitignore) *.class *.ear @@ -90,4 +93,4 @@ gradle-app.setting /TEST-*.xml **/*_gen **/*_gen.caches -.mps/workspace.xml +.mps/workspace.xml \ No newline at end of file From ed953cdda52bf3f115073ce838999a8af636747f Mon Sep 17 00:00:00 2001 From: WimBast Date: Thu, 29 May 2025 09:38:04 +0200 Subject: [PATCH 161/179] simple pushNow --- src/main/java/org/modelingvalue/dclare/Mutable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index c96653c0..fc326f76 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -192,13 +192,13 @@ default void pushNow() { AbstractDerivationTransaction tx = (AbstractDerivationTransaction) LeafTransaction.getCurrent(); try { MutableClass dClass = dClass(); + Set nonDerivers = MutableClass.D_NON_DERIVERS.get(dClass).asSet(); + nonDerivers.forEach(o -> tx.runDeriver(this, null, o, 0)); Set containments = MutableClass.D_CONTAINMENTS.get(dClass); Set children = containments.flatMap(s -> s. getCollection(this)).asSet(); children.forEach(m -> m.pushNow()); - Set nonDerivers = MutableClass.D_NON_DERIVERS.get(dClass).asSet(); - nonDerivers.forEach(o -> tx.runDeriver(this, null, o, 0)); - Set observeds = MutableClass.D_PUSH_IF_PULL.get(dClass); - observeds.forEach(o -> o.get(this)); + // Set observeds = MutableClass.D_PUSH_IF_PULL.get(dClass); + // observeds.forEach(o -> o.get(this)); } catch (Throwable t) { tx.universeTransaction().handleException(t); } From ea03c612d91c01404b055aae180efd1d43f0b7b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 13:32:51 +0000 Subject: [PATCH 162/179] Bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 40ab4a71..e67b3d3a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: TOKEN: "${{secrets.ALLREP_TOKEN}}" CI: "true" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 From a569094ad5fc667c602202df548c659ffb778c16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 03:17:46 +0000 Subject: [PATCH 163/179] Bump actions/setup-java from 4 to 5 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 40ab4a71..bb973516 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: java-version: 17 distribution: zulu From 0487f7e0eed38cd0581d75c6b12db19880af7e50 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Tue, 2 Dec 2025 13:38:15 +0100 Subject: [PATCH 164/179] bump checkout to v6 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7209a488..1b87c775 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: TOKEN: "${{secrets.ALLREP_TOKEN}}" CI: "true" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: fetch-depth: 0 From d047cbb890dbd0323e506fec78d582c5f5d871c1 Mon Sep 17 00:00:00 2001 From: automation Date: Fri, 9 Jan 2026 13:16:53 +0000 Subject: [PATCH 165/179] [no-ci] updated by mvgplugin --- .github/dependabot.yml | 2 +- build.gradle.kts | 2 +- gradle.properties | 2 +- settings.gradle.kts | 2 +- .../org/modelingvalue/dclare/AbstractDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Action.java | 2 +- src/main/java/org/modelingvalue/dclare/ActionInstance.java | 2 +- src/main/java/org/modelingvalue/dclare/ActionTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Constant.java | 2 +- src/main/java/org/modelingvalue/dclare/ConstantState.java | 2 +- src/main/java/org/modelingvalue/dclare/Construction.java | 2 +- src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/DclareConfig.java | 2 +- src/main/java/org/modelingvalue/dclare/DclareTrace.java | 2 +- src/main/java/org/modelingvalue/dclare/Derivation.java | 2 +- .../java/org/modelingvalue/dclare/DerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Direction.java | 2 +- src/main/java/org/modelingvalue/dclare/Feature.java | 2 +- src/main/java/org/modelingvalue/dclare/FeatureModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/FixpointGroup.java | 2 +- src/main/java/org/modelingvalue/dclare/Getable.java | 2 +- src/main/java/org/modelingvalue/dclare/ILeafTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/IState.java | 2 +- src/main/java/org/modelingvalue/dclare/IdentityDerivation.java | 2 +- .../org/modelingvalue/dclare/IdentityDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Imperative.java | 2 +- .../java/org/modelingvalue/dclare/ImperativeTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/JsonToState.java | 2 +- src/main/java/org/modelingvalue/dclare/LazyDerivation.java | 2 +- .../org/modelingvalue/dclare/LazyDerivationTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Leaf.java | 2 +- src/main/java/org/modelingvalue/dclare/LeafModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/LeafTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/MatchInfo.java | 2 +- src/main/java/org/modelingvalue/dclare/Mutable.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableClass.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableState.java | 2 +- src/main/java/org/modelingvalue/dclare/MutableTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Newable.java | 2 +- src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java | 2 +- .../java/org/modelingvalue/dclare/NonInternableObserver.java | 2 +- src/main/java/org/modelingvalue/dclare/Observed.java | 2 +- src/main/java/org/modelingvalue/dclare/ObservedInstance.java | 2 +- src/main/java/org/modelingvalue/dclare/Observer.java | 2 +- src/main/java/org/modelingvalue/dclare/ObserverTrace.java | 2 +- src/main/java/org/modelingvalue/dclare/ObserverTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/OneShot.java | 2 +- src/main/java/org/modelingvalue/dclare/Priority.java | 2 +- src/main/java/org/modelingvalue/dclare/ReadOnly.java | 2 +- src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/ReusableTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/Setable.java | 2 +- src/main/java/org/modelingvalue/dclare/SetableModifier.java | 2 +- src/main/java/org/modelingvalue/dclare/State.java | 2 +- src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java | 2 +- src/main/java/org/modelingvalue/dclare/StateMap.java | 2 +- src/main/java/org/modelingvalue/dclare/StateMergeHandler.java | 2 +- src/main/java/org/modelingvalue/dclare/StateToJson.java | 2 +- src/main/java/org/modelingvalue/dclare/This.java | 2 +- src/main/java/org/modelingvalue/dclare/Transaction.java | 2 +- src/main/java/org/modelingvalue/dclare/TransactionClass.java | 2 +- src/main/java/org/modelingvalue/dclare/TransactionId.java | 2 +- src/main/java/org/modelingvalue/dclare/TypeWrapper.java | 2 +- src/main/java/org/modelingvalue/dclare/Universe.java | 2 +- src/main/java/org/modelingvalue/dclare/UniverseStatistics.java | 2 +- src/main/java/org/modelingvalue/dclare/UniverseTransaction.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java | 2 +- .../modelingvalue/dclare/ex/CycleInParentChainException.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java | 2 +- .../org/modelingvalue/dclare/ex/EmptyMandatoryException.java | 2 +- .../modelingvalue/dclare/ex/NoCurrentTransactionException.java | 2 +- .../org/modelingvalue/dclare/ex/NonDeterministicException.java | 2 +- .../org/modelingvalue/dclare/ex/NotYetDerivableException.java | 2 +- .../java/org/modelingvalue/dclare/ex/OutOfScopeException.java | 2 +- .../org/modelingvalue/dclare/ex/ReferencedOrphanException.java | 2 +- src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyChangesException.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyObservedException.java | 2 +- .../org/modelingvalue/dclare/ex/TooManyObserversException.java | 2 +- .../java/org/modelingvalue/dclare/ex/TransactionException.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/Converters.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/JsonIC.java | 2 +- .../java/org/modelingvalue/dclare/sync/SerialisationPool.java | 2 +- .../java/org/modelingvalue/dclare/sync/SerializationHelper.java | 2 +- .../modelingvalue/dclare/sync/SerializationHelperWithPool.java | 2 +- .../org/modelingvalue/dclare/sync/SocketSyncConnection.java | 2 +- .../java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java | 2 +- .../org/modelingvalue/dclare/sync/SyncConnectionHandler.java | 2 +- .../org/modelingvalue/dclare/sync/UniverseSynchronizer.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/Util.java | 2 +- src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java | 2 +- .../java/org/modelingvalue/dclare/test/CommunicationTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/DclareTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/JsonICTests.java | 2 +- src/test/java/org/modelingvalue/dclare/test/NewableTests.java | 2 +- .../org/modelingvalue/dclare/test/SerialisationPoolTests.java | 2 +- .../modelingvalue/dclare/test/support/CommunicationHelper.java | 2 +- .../modelingvalue/dclare/test/support/CommunicationPeer.java | 2 +- .../java/org/modelingvalue/dclare/test/support/Fibonacci.java | 2 +- .../java/org/modelingvalue/dclare/test/support/ModelMaker.java | 2 +- .../org/modelingvalue/dclare/test/support/OneShotTests.java | 2 +- .../java/org/modelingvalue/dclare/test/support/PeerTester.java | 2 +- src/test/java/org/modelingvalue/dclare/test/support/Shared.java | 2 +- .../org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java | 2 +- .../java/org/modelingvalue/dclare/test/support/TestMutable.java | 2 +- .../org/modelingvalue/dclare/test/support/TestMutableClass.java | 2 +- .../java/org/modelingvalue/dclare/test/support/TestNewable.java | 2 +- .../org/modelingvalue/dclare/test/support/TestNewableClass.java | 2 +- .../org/modelingvalue/dclare/test/support/TestObserved.java | 2 +- .../org/modelingvalue/dclare/test/support/TestScheduler.java | 2 +- .../org/modelingvalue/dclare/test/support/TestUniverse.java | 2 +- 113 files changed, 113 insertions(+), 113 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 49c8a9f2..84fb5d05 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ ## ~ ## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ ## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/build.gradle.kts b/build.gradle.kts index 0ea5e6d2..61a74281 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/gradle.properties b/gradle.properties index e9e5f23f..0700e726 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -## (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +## (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ ## ~ ## Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ ## compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/settings.gradle.kts b/settings.gradle.kts index f521fe01..7713da97 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java index 37f6d1f5..c393445a 100644 --- a/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/AbstractDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Action.java b/src/main/java/org/modelingvalue/dclare/Action.java index 5cda0fd5..7ad5df55 100644 --- a/src/main/java/org/modelingvalue/dclare/Action.java +++ b/src/main/java/org/modelingvalue/dclare/Action.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ActionInstance.java b/src/main/java/org/modelingvalue/dclare/ActionInstance.java index c1c8573f..15ab8358 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ActionInstance.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java index 5af2f54c..bb055b8b 100644 --- a/src/main/java/org/modelingvalue/dclare/ActionTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ActionTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Constant.java b/src/main/java/org/modelingvalue/dclare/Constant.java index 0ff59da6..9fab6bf2 100644 --- a/src/main/java/org/modelingvalue/dclare/Constant.java +++ b/src/main/java/org/modelingvalue/dclare/Constant.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 10fe9875..9dc2d488 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Construction.java b/src/main/java/org/modelingvalue/dclare/Construction.java index 2fc5593c..f0700bfd 100644 --- a/src/main/java/org/modelingvalue/dclare/Construction.java +++ b/src/main/java/org/modelingvalue/dclare/Construction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java b/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java index 37f99f26..ad8a3a6a 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreLeafModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java index 136b5c73..b9da6efb 100644 --- a/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/CoreSetableModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DclareConfig.java b/src/main/java/org/modelingvalue/dclare/DclareConfig.java index b835ca90..a495f143 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareConfig.java +++ b/src/main/java/org/modelingvalue/dclare/DclareConfig.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DclareTrace.java b/src/main/java/org/modelingvalue/dclare/DclareTrace.java index a5ccce29..faddb4da 100644 --- a/src/main/java/org/modelingvalue/dclare/DclareTrace.java +++ b/src/main/java/org/modelingvalue/dclare/DclareTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Derivation.java b/src/main/java/org/modelingvalue/dclare/Derivation.java index 42ad1cf7..0db13aef 100644 --- a/src/main/java/org/modelingvalue/dclare/Derivation.java +++ b/src/main/java/org/modelingvalue/dclare/Derivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java index 75517cf5..943b9103 100644 --- a/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/DerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Direction.java b/src/main/java/org/modelingvalue/dclare/Direction.java index 21645f10..8af76d7e 100644 --- a/src/main/java/org/modelingvalue/dclare/Direction.java +++ b/src/main/java/org/modelingvalue/dclare/Direction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Feature.java b/src/main/java/org/modelingvalue/dclare/Feature.java index 0726a141..05ae9efe 100644 --- a/src/main/java/org/modelingvalue/dclare/Feature.java +++ b/src/main/java/org/modelingvalue/dclare/Feature.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java index 67ab196f..b703fdac 100644 --- a/src/main/java/org/modelingvalue/dclare/FeatureModifier.java +++ b/src/main/java/org/modelingvalue/dclare/FeatureModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java index f3b7a3c2..cb14d914 100644 --- a/src/main/java/org/modelingvalue/dclare/FixpointGroup.java +++ b/src/main/java/org/modelingvalue/dclare/FixpointGroup.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Getable.java b/src/main/java/org/modelingvalue/dclare/Getable.java index eeb145e4..c4d5d9bc 100644 --- a/src/main/java/org/modelingvalue/dclare/Getable.java +++ b/src/main/java/org/modelingvalue/dclare/Getable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java b/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java index dd20f832..7dfad2ab 100644 --- a/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ILeafTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IState.java b/src/main/java/org/modelingvalue/dclare/IState.java index 5d8d02fe..3f3e4539 100644 --- a/src/main/java/org/modelingvalue/dclare/IState.java +++ b/src/main/java/org/modelingvalue/dclare/IState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java index 75d36a65..e5e83114 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java index b97913a2..ccf715a6 100644 --- a/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/IdentityDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Imperative.java b/src/main/java/org/modelingvalue/dclare/Imperative.java index 1f8aba2a..6f2034e9 100644 --- a/src/main/java/org/modelingvalue/dclare/Imperative.java +++ b/src/main/java/org/modelingvalue/dclare/Imperative.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java index 9ad05ef9..ee97dfb9 100644 --- a/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ImperativeTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/JsonToState.java b/src/main/java/org/modelingvalue/dclare/JsonToState.java index 3d1cab4e..3e8bebcc 100644 --- a/src/main/java/org/modelingvalue/dclare/JsonToState.java +++ b/src/main/java/org/modelingvalue/dclare/JsonToState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java index 43e5e09b..5eb1ddaf 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivation.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivation.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java index 76092b2d..b32c64ab 100644 --- a/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LazyDerivationTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Leaf.java b/src/main/java/org/modelingvalue/dclare/Leaf.java index 7ad05b3d..58804fa8 100644 --- a/src/main/java/org/modelingvalue/dclare/Leaf.java +++ b/src/main/java/org/modelingvalue/dclare/Leaf.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LeafModifier.java b/src/main/java/org/modelingvalue/dclare/LeafModifier.java index af32abef..b696359a 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafModifier.java +++ b/src/main/java/org/modelingvalue/dclare/LeafModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java index 20345164..6a064a78 100644 --- a/src/main/java/org/modelingvalue/dclare/LeafTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/LeafTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MatchInfo.java b/src/main/java/org/modelingvalue/dclare/MatchInfo.java index 3ce34283..c4f7654a 100644 --- a/src/main/java/org/modelingvalue/dclare/MatchInfo.java +++ b/src/main/java/org/modelingvalue/dclare/MatchInfo.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Mutable.java b/src/main/java/org/modelingvalue/dclare/Mutable.java index fc326f76..c4041d27 100644 --- a/src/main/java/org/modelingvalue/dclare/Mutable.java +++ b/src/main/java/org/modelingvalue/dclare/Mutable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableClass.java b/src/main/java/org/modelingvalue/dclare/MutableClass.java index 2c021d96..12ea480f 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableClass.java +++ b/src/main/java/org/modelingvalue/dclare/MutableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableState.java b/src/main/java/org/modelingvalue/dclare/MutableState.java index 74f3409f..92400093 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableState.java +++ b/src/main/java/org/modelingvalue/dclare/MutableState.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java index 4579064a..117cf6bb 100644 --- a/src/main/java/org/modelingvalue/dclare/MutableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/MutableTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Newable.java b/src/main/java/org/modelingvalue/dclare/Newable.java index fd689459..d553f4c8 100644 --- a/src/main/java/org/modelingvalue/dclare/Newable.java +++ b/src/main/java/org/modelingvalue/dclare/Newable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java index 4c37f0a4..f1257bfb 100644 --- a/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonCheckingObserver.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java index a369194f..81e27a44 100644 --- a/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java +++ b/src/main/java/org/modelingvalue/dclare/NonInternableObserver.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Observed.java b/src/main/java/org/modelingvalue/dclare/Observed.java index 6d697fb5..2931fdd9 100644 --- a/src/main/java/org/modelingvalue/dclare/Observed.java +++ b/src/main/java/org/modelingvalue/dclare/Observed.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java index b1752374..111eabc3 100644 --- a/src/main/java/org/modelingvalue/dclare/ObservedInstance.java +++ b/src/main/java/org/modelingvalue/dclare/ObservedInstance.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Observer.java b/src/main/java/org/modelingvalue/dclare/Observer.java index b55004f1..81934b4a 100644 --- a/src/main/java/org/modelingvalue/dclare/Observer.java +++ b/src/main/java/org/modelingvalue/dclare/Observer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java index 57845284..4f55699d 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java index 4d7e1d28..61d07379 100644 --- a/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ObserverTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 8bf20d7d..9c41f1da 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Priority.java b/src/main/java/org/modelingvalue/dclare/Priority.java index 9611bb33..b474a280 100644 --- a/src/main/java/org/modelingvalue/dclare/Priority.java +++ b/src/main/java/org/modelingvalue/dclare/Priority.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnly.java b/src/main/java/org/modelingvalue/dclare/ReadOnly.java index 55bf3c79..81d73fd7 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnly.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnly.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java index 4776c5fb..a4a861ee 100644 --- a/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReadOnlyTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java index 6a216e7b..59ba7d09 100644 --- a/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/ReusableTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Setable.java b/src/main/java/org/modelingvalue/dclare/Setable.java index 8ccc05bf..ea2fd447 100644 --- a/src/main/java/org/modelingvalue/dclare/Setable.java +++ b/src/main/java/org/modelingvalue/dclare/Setable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/SetableModifier.java b/src/main/java/org/modelingvalue/dclare/SetableModifier.java index eb0181c7..27d57b9f 100644 --- a/src/main/java/org/modelingvalue/dclare/SetableModifier.java +++ b/src/main/java/org/modelingvalue/dclare/SetableModifier.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/State.java b/src/main/java/org/modelingvalue/dclare/State.java index f4cff558..1d1bae4a 100644 --- a/src/main/java/org/modelingvalue/dclare/State.java +++ b/src/main/java/org/modelingvalue/dclare/State.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java index 85df0428..bf53d7b5 100644 --- a/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateDeltaHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateMap.java b/src/main/java/org/modelingvalue/dclare/StateMap.java index 363403fa..24ff618d 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMap.java +++ b/src/main/java/org/modelingvalue/dclare/StateMap.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java index 1791e3ac..e4f685e9 100644 --- a/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java +++ b/src/main/java/org/modelingvalue/dclare/StateMergeHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/StateToJson.java b/src/main/java/org/modelingvalue/dclare/StateToJson.java index a7cdaf4a..eb802a6b 100644 --- a/src/main/java/org/modelingvalue/dclare/StateToJson.java +++ b/src/main/java/org/modelingvalue/dclare/StateToJson.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/This.java b/src/main/java/org/modelingvalue/dclare/This.java index 24914670..f554802a 100644 --- a/src/main/java/org/modelingvalue/dclare/This.java +++ b/src/main/java/org/modelingvalue/dclare/This.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Transaction.java b/src/main/java/org/modelingvalue/dclare/Transaction.java index 3f4af914..471ebd1e 100644 --- a/src/main/java/org/modelingvalue/dclare/Transaction.java +++ b/src/main/java/org/modelingvalue/dclare/Transaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TransactionClass.java b/src/main/java/org/modelingvalue/dclare/TransactionClass.java index 4562ff8e..f28b3c8f 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionClass.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TransactionId.java b/src/main/java/org/modelingvalue/dclare/TransactionId.java index edbd07ed..46338f86 100644 --- a/src/main/java/org/modelingvalue/dclare/TransactionId.java +++ b/src/main/java/org/modelingvalue/dclare/TransactionId.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java index 90624f8e..be103c87 100644 --- a/src/main/java/org/modelingvalue/dclare/TypeWrapper.java +++ b/src/main/java/org/modelingvalue/dclare/TypeWrapper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/Universe.java b/src/main/java/org/modelingvalue/dclare/Universe.java index e8badb9d..da0c16e1 100644 --- a/src/main/java/org/modelingvalue/dclare/Universe.java +++ b/src/main/java/org/modelingvalue/dclare/Universe.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java index b413c996..8b22a1dd 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseStatistics.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index c6639518..028cd229 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java index 1719b0b7..f3a195a8 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ConsistencyError.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java index 017f0b52..3df29a71 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/CycleInParentChainException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java index 8c5aff09..b9d4ad2f 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java +++ b/src/main/java/org/modelingvalue/dclare/ex/DebugTrace.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java index 673760f0..1465e946 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/EmptyMandatoryException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java index fa49dfcb..40df3c4a 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NoCurrentTransactionException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java index 6d278c9b..99970f99 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NonDeterministicException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java index 44269a1b..b7f5606e 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/NotYetDerivableException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java index 9b290779..b9121ab0 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/OutOfScopeException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java index bf93cf0c..99636f02 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ReferencedOrphanException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java index 2e471c4a..984d605e 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java +++ b/src/main/java/org/modelingvalue/dclare/ex/ThrowableError.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java index 0543262d..ed0c8c04 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyChangesException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java index d8f99a1f..9ba59220 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObservedException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java index 46714b68..817d968b 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TooManyObserversException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java index aca1754c..ee77e4b7 100644 --- a/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java +++ b/src/main/java/org/modelingvalue/dclare/ex/TransactionException.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/Converters.java b/src/main/java/org/modelingvalue/dclare/sync/Converters.java index cf086944..3c53b8d3 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Converters.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Converters.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java index 4ae64aed..ade8bb0a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java +++ b/src/main/java/org/modelingvalue/dclare/sync/DeltaAdaptor.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java index e4eb970b..59503afe 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java +++ b/src/main/java/org/modelingvalue/dclare/sync/JsonIC.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java index 5662518a..8c29d151 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerialisationPool.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java index 806722b8..df079547 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java index 1070086c..4b83391c 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SerializationHelperWithPool.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java index 95031fd0..b07be160 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SocketSyncConnection.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java index 4a2790ff..b9cec47a 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SupplierAndConsumer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java index addc9518..10c75450 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java +++ b/src/main/java/org/modelingvalue/dclare/sync/SyncConnectionHandler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java index 902ea775..a4901cbf 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java +++ b/src/main/java/org/modelingvalue/dclare/sync/UniverseSynchronizer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/Util.java b/src/main/java/org/modelingvalue/dclare/sync/Util.java index d0801c38..ab1d59f8 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/Util.java +++ b/src/main/java/org/modelingvalue/dclare/sync/Util.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java index 2020d963..031bf4a8 100644 --- a/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java +++ b/src/main/java/org/modelingvalue/dclare/sync/WorkDaemon.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java index e6533a8a..d4873f06 100644 --- a/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/CommunicationTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java index 0b270e38..5ff60609 100644 --- a/src/test/java/org/modelingvalue/dclare/test/DclareTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/DclareTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java index a2effcab..e6b41ea5 100644 --- a/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/JsonICTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java index 71347ed4..ba0685ee 100644 --- a/src/test/java/org/modelingvalue/dclare/test/NewableTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/NewableTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java index 9a4f8dcb..5c03a868 100644 --- a/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/SerialisationPoolTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java index 6d2e21dd..37ebb4e5 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationHelper.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java index 3747156f..9cbcc43c 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/CommunicationPeer.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java index 6461d29e..43e43d84 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Fibonacci.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java index 232899c7..6da90656 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/ModelMaker.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java index 990c6ec5..e3e3946e 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/OneShotTests.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java index a8ee8e95..47243397 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/PeerTester.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java index 9128f2be..81cea613 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/Shared.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/Shared.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java index 74286a9f..f2acf6c3 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestDeltaAdaptor.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java index dc11848b..a86b7022 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java index c29f7c59..2aed2032 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestMutableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java index 9898a970..d400433a 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewable.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java index f4136d54..c553360d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestNewableClass.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java index dd7fd436..f1e99b2c 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestObserved.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java index d6f3dfe4..4693d9d8 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestScheduler.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ diff --git a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java index 079329ba..fd84de1d 100644 --- a/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java +++ b/src/test/java/org/modelingvalue/dclare/test/support/TestUniverse.java @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// (C) Copyright 2018-2025 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ // Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ // compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ From 2357341a32102fe5c53361f1822d2b0f04700e5e Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Thu, 26 Feb 2026 22:31:46 +0100 Subject: [PATCH 166/179] upgrade to java21 and gradle 9 --- build.gradle.kts | 2 +- gradle.properties | 4 ++-- gradle/wrapper/gradle-wrapper.jar | Bin 61574 -> 43453 bytes gradle/wrapper/gradle-wrapper.properties | 3 ++- gradlew | 29 +++++++++++++---------- gradlew.bat | 20 ++++++++-------- settings.gradle.kts | 12 ++++++---- 7 files changed, 39 insertions(+), 31 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 61a74281..d97032a4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,7 +23,7 @@ defaultTasks("mvgCorrector", "test", "publish", "mvgTagger") plugins { `java-library` `maven-publish` - id("org.modelingvalue.gradle.mvgplugin") version "1.1.3" + id("org.modelingvalue.gradle.mvgplugin") version "2.3.15" idea eclipse } diff --git a/gradle.properties b/gradle.properties index 0700e726..410a7699 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,5 +21,5 @@ # suppress inspection "UnusedProperty" for whole file group = org.modelingvalue artifact = dclare -version = 4.1.0 -version_java = 17 +version = 5.1.0 +version_java = 21 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa754578e88a3dae77fce6e3dea56edbf..e6441136f3d4ba8a0da8d277868979cfbc8ad796 100644 GIT binary patch literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MP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0hqXa5oJ_slh@(5MMS4xnG= z{0aK#F@_p=e}FdAa3tEl!|+j?h8h`t0CvCmNU%dOwEq<+jmm-=n|r|G^7QX4N4o(v zPU!%%w(Cet)Zev3QA?;TMm_aEK!5(~Nc6pJlp|sQP@z%JI}f0_`u+rc`1Df^j0G&s ScNgau(U?ep-K_E5zy1%ZQTdPn diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 20db9ad5..37f78a6a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..25da30db 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/settings.gradle.kts b/settings.gradle.kts index 7713da97..50a6cd87 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,10 @@ +pluginManagement { + repositories { + maven { url = uri("https://modelingvaluegroup.github.io/gradlePlugins/") } + gradlePluginPortal() + } +} + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ // ~ @@ -21,11 +28,6 @@ rootProject.name = "dclare" include() - -plugins { - id("com.gradle.enterprise") version ("3.5") -} - val inEclipse=System.getenv("GRADLE_ECLIPSE") println("Gradle: inEclipse="+inEclipse) if(inEclipse!=null && inEclipse.equals("true")) { From 6de6d9d0f82c580d770892a6f8c0aaef8b6fc183 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Mon, 2 Mar 2026 12:11:55 +0100 Subject: [PATCH 167/179] upgrade IntelliJ project SDK to Java 21 --- .idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 4f82f21f..0e6a221d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -30,7 +30,7 @@ - +

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naq~UdM7s=GOvB(Or(1?YUO28|Iw1atTLVXy_smh5C`F75$0#36~c)x zyqUtN&vHQ0dTHZV9VAKu|+Yn-!FIM zsk>mTeukp5&*%%fZFy>9ha0zYVy^zPr>~`5t-oz`CSfeGBOWpWJR{p~CPa%*?6iw; zAudKg;#4l_Z``e&O@gJ zZyX6s&1?H_X#s%&inBAN+8Vokiftii=WuhvbC??3GAsK|FS$uwW>W_OwlHtCB#H%Xhw0FkI|^(oSet-(A7 zzp(VKSlYy+d$LBqT3C0CeE3w|l#)@tpY3M<^}}lZp++#(!2V700V(aHkkxf=*=?zy zxc!9jm&W@yVI}OWWg-u3m zioLs+hTFpMyukPQp7t~sXz3fww76a6It|U}Q<6ua(A7PD0xf!zXHnMPJgN>2t#;s2 z^rkALD)e<_qdhpe*E1!y8*)uvxdW_VPM1yj*rJ+tAR1ck-5Q_c+p5L{@nT&I(+x&eB5F4LqeO$(&g*y*MqW7DVt4~d~7R4+`j z^8x*;QVN!N-lxEBl?&yeZNWkkU|($sBm1fj=Jekpb9_V*J**7H@8Dhl zjb$Y-5FpO`B0z|OZDxf1$%iErRh~qAUHCtc3Xl}xB*MRwK;ZTO1Nq~_gs_|!t;K@2M7%@?h0CW?MkQxb;DM5sM>f~U@xmzHR5D641MS$SId>s$h zaemIbU^d1`RHvZ#x0%CP1nr5E<~QfgiZgC+!S1b93wt3j)cIsL~kyfwP*Bu>Us^<0An>F8v3x5fzW^r$8Wa67abd z5zKJpCxXX6`hY-UB;c|Q5o~N`0(4x#MELh0xz}_AQ!9252u=d`+#`Ws*zx-l2qZzWmT@K#(r=T29k*crK0FIKM5v-o8b+)ls6ZfXdJss2 dL`goE2uYNj1UTAx82CVZAVvbDQ1ZK;_#Zl>@t6Pr diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f78a6a..dbc3ce4a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index adff685a..0262dcbd 100755 --- a/gradlew +++ b/gradlew @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. From edacc7f4a8243ff92a87f0a4af17b2ada2759b54 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Fri, 6 Mar 2026 20:07:28 +0100 Subject: [PATCH 174/179] add CLAUDE.md for repository guidelines and introduce `OneShotTracer` interface for detailed trace logging --- CLAUDE.md | 107 ++++++++ .../org/modelingvalue/dclare/OneShot.java | 239 ++++++++---------- .../modelingvalue/dclare/OneShotTracer.java | 132 ++++++++++ 3 files changed, 345 insertions(+), 133 deletions(-) create mode 100644 CLAUDE.md create mode 100644 src/main/java/org/modelingvalue/dclare/OneShotTracer.java diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..bbfddcea --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,107 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +**dclare** is a declarative rule engine for Java. Rules are enforced continuously and automatically — no listeners needed. The implementation is heavily multi-threaded while the API exposes no concurrency primitives. + +- **Group:** `org.modelingvalue`, **Artifact:** `dclare`, **Version:** 5.1.0 +- **Java:** 21 +- **License:** LGPL-3.0 +- **Dependencies:** `immutable-collections` and `mvg-json` (both from org.modelingvalue) + +## Build Commands + +```bash +./gradlew # Runs default tasks: mvgCorrector, test, publish, mvgTagger +./gradlew test # Run all tests +./gradlew test --tests "org.modelingvalue.dclare.test.DclareTests.source2target" # Single test method +./gradlew test --tests "org.modelingvalue.dclare.test.DclareTests" # Single test class +``` + +There is no separate lint command; the `mvgCorrector` task handles code corrections (copyright headers, formatting). + +## Architecture + +### Core Abstractions + +The engine is built around a **transaction-based state machine** where immutable `State` snapshots evolve through transactions: + +- **Universe** — Root mutable object; entry point for the entire model. Created via `Universe.of(...)`. +- **Mutable** — Base interface for all model objects. Establishes parent/child containment hierarchy. +- **MutableClass** — Metadata interface describing the features (observables, observers, derivers) of a Mutable type. + +### Property System (Getable → Setable → Observed/Constant) + +- **Getable** — Base readable property with ID and default function. +- **Setable** — Writable property. Supports opposites, scoping, orphan protection. +- **Observed** — Tracked property that triggers observer re-evaluation on change. +- **Constant** — Derived/cached value computed from a deriver function. Can be lazy or pushed. + +### Rule System (Leaf → Action/Observer) + +- **Action** — Imperative operation triggered by state changes. Has priority and direction. +- **Observer** — Declarative rule that re-executes when its dependencies change. The primary mechanism for maintaining consistency. +- **Derivation** — Lazy computation that evaluates on demand. + +### Transaction Hierarchy + +``` +Transaction (abstract) +├── LeafTransaction (abstract) +│ ├── ActionTransaction +│ ├── ObserverTransaction +│ ├── DerivationTransaction / LazyDerivationTransaction / IdentityDerivationTransaction +│ ├── ReadOnlyTransaction +│ └── ImperativeTransaction +├── MutableTransaction +└── UniverseTransaction ← orchestrates the overall execution loop +``` + +### Priority Scheduling + +Actions/Observers have priorities (`Priority.one` through `Priority.six`) controlling execution order. Lower priorities execute first. `Priority.zero` represents the currently executing level. + +### Modifiers + +- **SetableModifier** / **CoreSetableModifier** — containment, mandatory, preserved, plumbing, durable, doNotMerge, symmetricOpposite +- **LeafModifier** / **CoreLeafModifier** — preserved, read +- **Direction** — Push (eager) vs Pull (lazy) evaluation + +### Synchronization Module (`sync/`) + +Enables multi-instance state synchronization via JSON deltas. Key classes: `DeltaAdaptor`, `SerialisationPool`, `UniverseSynchronizer`, `SocketSyncConnection`. + +### OneShot + +Abstract class for single-run model initialization. Methods annotated with `@OneShotAction` are discovered and executed in alphabetical order. Supports state caching. + +## Naming Conventions + +- `D_` prefix — Internal system properties on Mutable (e.g., `D_PARENT_CONTAINING`, `D_OBSERVERS`) +- `d*()` methods — Dclare-specific operations on Mutable (e.g., `dParent()`, `dChildren()`, `dDelete()`) +- Factory pattern — Most core types use `of(...)` static factory methods +- Property access — `.get(object)` to read, `.set(object, value)` to write within transaction context + +## Configuration + +`DclareConfig` supports system properties for debugging: + +- `DEV_MODE` — Enable debug features +- `RUN_SEQUENTIAL` — Disable parallelism (useful for debugging) +- `CHECK_ORPHAN_STATE` — Validate orphan handling +- `TRACE_UNIVERSE`, `TRACE_MUTABLE`, `TRACE_ACTIONS`, `TRACE_MATCHING`, `TRACE_RIPPLE_OUT`, `TRACE_DERIVATION` — Various tracing flags +- `MAX_TOTAL_NR_OF_CHANGES`, `MAX_NR_OF_CHANGES`, `MAX_NR_OF_OBSERVED`, `MAX_NR_OF_OBSERVERS` — Safety limits + +## Testing + +Tests use JUnit 5. Test support classes are in `src/test/java/org/modelingvalue/dclare/test/support/` providing `TestUniverse`, `TestMutable`, `TestMutableClass`, and other helpers for constructing test models. + +## File Headers + +All source files include a copyright header block for Modeling Value Group B.V. The `mvgCorrector` gradle task maintains these automatically. + +## Eclipse Integration + +When `GRADLE_ECLIPSE=true` environment variable is set, the build uses `includeBuild` to substitute local checkouts of `immutable-collections` and `mvg-json` from sibling directories. diff --git a/src/main/java/org/modelingvalue/dclare/OneShot.java b/src/main/java/org/modelingvalue/dclare/OneShot.java index 9c41f1da..9f16031d 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShot.java +++ b/src/main/java/org/modelingvalue/dclare/OneShot.java @@ -33,8 +33,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; -import java.util.function.Predicate; -import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -59,18 +57,27 @@ */ @SuppressWarnings("unused") public abstract class OneShot { - private static final boolean TRACE_ONE_SHOT = Boolean.getBoolean("TRACE_ONE_SHOT"); - private static final String TRACE_ONE_SHOT_OBJECT = System.getProperty("TRACE_ONE_SHOT_OBJECT"); - private static final String TRACE_ONE_SHOT_SETABLE = System.getProperty("TRACE_ONE_SHOT_SETABLE"); - private static final MutationWrapper, StateMap>> STATE_MAP_CACHE = new MutationWrapper<>(Map.of()); - private static final MutationWrapper, Set>> ALL_METHODS_CACHE = new MutationWrapper<>(Map.of()); - private static final MutationWrapper, ConstantState>> CONSTANT_STATE_CACHE = new MutationWrapper<>(Map.of()); - private static final ContextPoolPool CONTEXT_POOL_POOL = new ContextPoolPool(); - - private final Class cacheKey = getClass(); - private final U universe; - private final boolean pull; - private State endState; + private static final MutationWrapper, StateMap>> STATE_MAP_CACHE = new MutationWrapper<>(Map.of()); + private static final MutationWrapper, Set>> ALL_METHODS_CACHE = new MutationWrapper<>(Map.of()); + private static final MutationWrapper, ConstantState>> CONSTANT_STATE_CACHE = new MutationWrapper<>(Map.of()); + private static OneShotTracer TRACER = new OneShotTracer.ToStderr(); + private static ContextPoolPool CONTEXT_POOL_POOL; + + public static void setTracer(OneShotTracer tracer) { + TRACER = tracer; + } + + private static synchronized ContextPoolPool contextPoolPool() { + if (CONTEXT_POOL_POOL == null) { + CONTEXT_POOL_POOL = new ContextPoolPool(); + } + return CONTEXT_POOL_POOL; + } + + private final Class cacheKey = getClass(); + private final U universe; + private final boolean pull; + private State endState; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @@ -78,10 +85,9 @@ public abstract class OneShot { boolean caching() default false; } - @SuppressWarnings("DataFlowIssue") public OneShot(U universe, boolean pull) { this.universe = universe; - this.pull = pull; + this.pull = pull; } /** @@ -108,11 +114,11 @@ public DclareConfig getConfig() { * @return the ContextPool that was created */ public ContextPool getContextPool() { - return CONTEXT_POOL_POOL.getContextPool(); + return contextPoolPool().getContextPool(); } public void doneWithContextPool(ContextPool contextPool) { - if (!CONTEXT_POOL_POOL.doneWithContextPool(contextPool)) { + if (!contextPoolPool().doneWithContextPool(contextPool)) { contextPool.shutdownNow(); } } @@ -140,20 +146,21 @@ public State getEndState() { if (endState == null) { ContextPool contextPool = getContextPool(); try { - long t0 = System.nanoTime(); - StateMap cachedStateMap = STATE_MAP_CACHE.get().get(cacheKey); - ConstantState cachedConstantState = CONSTANT_STATE_CACHE.get().get(cacheKey); - boolean runningFromCache = cachedStateMap != null; + long t0 = System.nanoTime(); + StateMap cachedStateMap = STATE_MAP_CACHE.get().get(cacheKey); + ConstantState cachedConstantState = CONSTANT_STATE_CACHE.get().get(cacheKey); + boolean runningFromCache = cachedStateMap != null; UniverseTransaction universeTransaction = new UniverseTransaction(getUniverse(), contextPool, pull, getConfig(), null, cachedStateMap, cachedConstantState); - List allActions = getAllActions(runningFromCache); - trace("START", "#actions=%d", allActions.size()); + List allActions = getAllActions(runningFromCache); + TRACER.traceStart(cacheKey.getSimpleName(), allActions.size()); allActions.forEach(a -> a.putAndWaitForIdle(universeTransaction)); universeTransaction.stop(); endState = universeTransaction.waitForEnd(); if (cachedConstantState == null) { CONSTANT_STATE_CACHE.update(a -> a.computeIfAbsent(cacheKey, __ -> universeTransaction.constantState())); } - trace("DONE", "duration=%5d ms", nano2ms(System.nanoTime() - t0)); + long t1 = System.nanoTime(); + TRACER.traceDone(cacheKey.getSimpleName(), nano2ms(t1 - t0)); } finally { doneWithContextPool(contextPool); } @@ -185,48 +192,38 @@ protected MyAction(Method method, boolean runningFromCache) { throw new Error(e); } }); - isCachingMethod = method.getAnnotation(OneShotAction.class).caching(); + isCachingMethod = method.getAnnotation(OneShotAction.class).caching(); this.runningFromCache = runningFromCache; } protected void putAndWaitForIdle(UniverseTransaction universeTransaction) { - long t0 = System.nanoTime(); boolean writeResultToCache = isCachingMethod && !runningFromCache; - boolean skip = isCachingMethod && runningFromCache; + boolean skip = isCachingMethod && runningFromCache; if (skip) { - trace(" CACHE-SKIP", "%s", id()); + TRACER.traceCacheSkip(OneShot.this.cacheKey.getSimpleName(), id()); } else { - trace(" >>ACTION", "%s", id()); + TRACER.traceActionBegin(OneShot.this.cacheKey.getSimpleName(), id()); + long t0 = System.nanoTime(); State intermediateState = universeTransaction.putAndWaitForIdle(this); - traceDiff(intermediateState); if (writeResultToCache) { - long t1 = System.nanoTime(); - trace(" CACHE-WRITE", "%s", id()); + TRACER.traceCacheWrite(OneShot.this.cacheKey.getSimpleName(), id()); STATE_MAP_CACHE.update(a -> a.computeIfAbsent(cacheKey, __ -> intermediateState.getStateMap())); } - long overallNano = System.nanoTime() - t0; - long methodNano = durationNano(); - long dtOverall = nano2ms(overallNano); - long dtMethod = nano2ms(methodNano); - long dtRules = nano2ms(overallNano - methodNano); - trace(" < objPred = TRACE_ONE_SHOT_OBJECT == null ? s -> true : Pattern.compile(TRACE_ONE_SHOT_OBJECT).asPredicate(); - Predicate setPred = TRACE_ONE_SHOT_SETABLE == null ? s -> true : Pattern.compile(TRACE_ONE_SHOT_SETABLE).asPredicate(); - System.err.println("******************************State*************************************"); - System.err.println(intermediateState.universeTransaction().emptyState().diffString(intermediateState, o -> objPred.test(o.toString()), s -> s.isTraced() && setPred.test(s.toString()))); - System.err.println("************************************************************************"); + long t1 = System.nanoTime(); + long overallNano = t1 - t0; + long methodNano = durationNano(); + long dtOverall = nano2ms(overallNano); + long dtMethod = nano2ms(methodNano); + long dtRules = nano2ms(overallNano - methodNano); + TRACER.traceActionEnd(OneShot.this.cacheKey.getSimpleName(), id(), dtOverall, dtMethod, dtRules); } } } + @SuppressWarnings("DataFlowIssue") private static Set getAllMethodsOf(Class clazz) { return ALL_METHODS_CACHE.updateAndGet(a -> a.computeIfAbsent(clazz, __ -> { - Set methods = computeAllMethodsOf(clazz); + Set methods = computeAllMethodsOf(clazz); List cachingMethods = methods.filter(m -> m.getAnnotation(OneShotAction.class).caching()).map(Method::getName).asList(); if (1 < cachingMethods.count()) { throw new IllegalStateException("the oneshot " + clazz.getSimpleName() + " has too many caching actions: " + cachingMethods.collect(Collectors.joining(", "))); @@ -240,10 +237,10 @@ private static Set computeAllMethodsOf(Class clazz) { for (Class c = clazz; c != Object.class; c = c.getSuperclass()) { for (Method m : c.getDeclaredMethods()) { if (m.isAnnotationPresent(OneShotAction.class) // - && m.getParameterCount() == 0// - && m.getReturnType().equals(void.class)// - && Modifier.isPublic(m.getModifiers())// - && !map.containsKey(m.getName())) {// + && m.getParameterCount() == 0// + && m.getReturnType().equals(void.class)// + && Modifier.isPublic(m.getModifiers())// + && !map.containsKey(m.getName())) {// map = map.put(m.getName(), m); } } @@ -251,26 +248,19 @@ private static Set computeAllMethodsOf(Class clazz) { return map.toValues().asSet(); } - private void trace(String what, String format, Object... args) { - if (TRACE_ONE_SHOT) { - System.err.printf("TRACE_ONE_SHOT: %-14s %-40s - %s\n", what, cacheKey.getSimpleName(), String.format(format, args)); - } - } - private static long nano2ms(long nano) { return nano / 1_000_000; } private static class ContextPoolPool { - private static final boolean NO_POOL_POOL_TRACE = Boolean.getBoolean("NO_POOL_POOL_TRACE"); - private static final int POOL_POOL_SIZE = Integer.getInteger("POOL_POOL_SIZE", Collection.PARALLELISM); - private static final int POOL_POOL_ALARM_THRESHOLD_SEC = Integer.getInteger("POOL_POOL_ALARM_THRESHOLD_SEC", 30); - private static final int POOL_POOL_AQUIRE_TIMEOUT_SEC = Integer.getInteger("POOL_POOL_AQUIRE_TIMEOUT_SEC", 30); - private static final int POOL_POOL_MONITOR_INTERVAL_SEC = Integer.getInteger("POOL_POOL_MONITOR_INTERVAL_SEC", 60); - // - private final BlockingDeque idleQueue = new LinkedBlockingDeque<>(makePools()); - private final BlockingDeque busyQueue = new LinkedBlockingDeque<>(); - private final AtomicReference poolPoolInfo = new AtomicReference<>(new PoolPoolInfo()); + private static final int POOL_POOL_SIZE = Integer.getInteger("POOL_POOL_SIZE", Collection.PARALLELISM); + private static final int POOL_POOL_ALARM_THRESHOLD_SEC = Integer.getInteger("POOL_POOL_ALARM_THRESHOLD_SEC", 30); + private static final int POOL_POOL_AQUIRE_TIMEOUT_SEC = Integer.getInteger("POOL_POOL_AQUIRE_TIMEOUT_SEC", 30); + private static final int POOL_POOL_MONITOR_INTERVAL_SEC = Integer.getInteger("POOL_POOL_MONITOR_INTERVAL_SEC", 60); + + private final BlockingDeque idleQueue = new LinkedBlockingDeque<>(makePools()); + private final BlockingDeque busyQueue = new LinkedBlockingDeque<>(); + private final AtomicReference poolPoolInfo = new AtomicReference<>(new PoolPoolInfo()); private final java.util.Map poolInfoMap; private static java.util.Collection makePools() { @@ -278,8 +268,8 @@ private static java.util.Collection makePools() { } public ContextPoolPool() { - trace("INIT"); poolInfoMap = makePoolInfoMap(); + TRACER.tracePoolPoolInit(Thread.currentThread().getName(), idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); new PoolPoolMonitor(this).start(); } @@ -290,18 +280,19 @@ private java.util.Map makePoolInfoMap() { public ContextPool getContextPool() { try { PoolPoolInfo.preUpdate(poolPoolInfo); - trace("get"); - long t0 = System.nanoTime(); + TRACER.tracePoolPoolGet(Thread.currentThread().getName(), idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); + long t0 = System.nanoTime(); PoolInfo info = idleQueue.pollFirst(POOL_POOL_AQUIRE_TIMEOUT_SEC, TimeUnit.SECONDS); - long dt = (System.nanoTime() - t0) / 1_000_000; + long t1 = System.nanoTime(); + long dt = nano2ms(t1 - t0); if (info == null) { - trace("timeout"); + TRACER.tracePoolPoolTimeout(Thread.currentThread().getName(), idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); throw new RuntimeException("timeout after " + dt + " ms while waiting for ContextPool"); } PoolPoolInfo.postUpdate(poolPoolInfo, dt); info.start(); busyQueue.addFirst(info); - trace(String.format("waited %6d ms", dt)); + TRACER.tracePoolPoolWaited(Thread.currentThread().getName(), dt, idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); return info.pool; } catch (InterruptedException e) { throw new RuntimeException("interrupted while waiting for ContextPool", e); @@ -314,27 +305,21 @@ public boolean doneWithContextPool(ContextPool pool) { return false; } if (!busyQueue.remove(info)) { - trace("pool not busy"); - throw new IllegalStateException("pool not busy"); + TRACER.tracePoolPoolNotBusy(Thread.currentThread().getName(), idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); + throw new IllegalStateException("PP_NOT_BUSY"); } info.stop(); idleQueue.addFirst(info); - trace("done"); + TRACER.tracePoolPoolDone(Thread.currentThread().getName(), idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); return true; } - private void trace(String msg) { - if (!NO_POOL_POOL_TRACE) { - System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", Thread.currentThread().getName(), msg, idleQueue.size(), busyQueue.size(), poolPoolInfo.get()); - } - } - private void check() { for (PoolInfo info : poolInfoMap.values()) { if (info.busy) { long duration = info.duration(); if (POOL_POOL_ALARM_THRESHOLD_SEC * 1000L < duration) { - System.err.printf("ALARM: ContextPool probably stuck (busy for %-8d ms): %s\n", duration, info.pool); + TRACER.tracePoolPoolAlarmStuck(Thread.currentThread().getName(), idleQueue.size(), busyQueue.size(), poolPoolInfo.get(), duration, info.pool.toString()); } } } @@ -352,12 +337,12 @@ private PoolPoolMonitor(ContextPoolPool contextPoolPool) { @SuppressWarnings("BusyWait") @Override public void run() { - for (;;) { + for (; ; ) { try { Thread.sleep(POOL_POOL_MONITOR_INTERVAL_SEC * 1000L); contextPoolPool.check(); } catch (InterruptedException e) { - System.err.println("WARNING PoolPoolMonitor interrupted!"); + TRACER.tracePoolPoolMonitorQuit(); return; } } @@ -366,9 +351,9 @@ public void run() { private static class PoolInfo { private final ContextPool pool; - private boolean busy; - private long startTick; - private long lastDuration; + private boolean busy; + private long startTick; + private long lastDuration; public PoolInfo() { pool = ContextThread.createPool(); @@ -380,15 +365,15 @@ public PoolInfo() { } public void start() { - busy = true; + busy = true; lastDuration = 0; - startTick = System.currentTimeMillis(); + startTick = System.currentTimeMillis(); } public void stop() { - busy = false; + busy = false; lastDuration = duration(); - startTick = 0; + startTick = 0; } public long duration() { @@ -397,51 +382,39 @@ public long duration() { } } - private static class PoolPoolInfo { - private final long gets; - private final long immediates; - private final long waits; - private final long totalWaitTime; - private final long maxWaitTime; - - public PoolPoolInfo() { - this.gets = 0; - this.immediates = 0; - this.waits = 0; - this.totalWaitTime = 0; - this.maxWaitTime = 0; - } + } - public static void preUpdate(AtomicReference poolPoolInfo) { - update(poolPoolInfo, info -> new PoolPoolInfo(info.gets + 1, info.immediates, info.waits, info.totalWaitTime, info.maxWaitTime)); - } + public record PoolPoolInfo(long gets, + long immediates, + long waits, + long totalWaitTime, + long maxWaitTime) { + public PoolPoolInfo() { + this(0, 0, 0, 0, 0); + } - public static void postUpdate(AtomicReference poolPoolInfo, long dt) { - update(poolPoolInfo, info -> new PoolPoolInfo(info.gets, info.immediates + (0 == dt ? 1 : 0), info.waits + (0 == dt ? 0 : 1), info.totalWaitTime + dt, Math.max(info.maxWaitTime, dt))); - } + public static void preUpdate(AtomicReference poolPoolInfo) { + update(poolPoolInfo, info -> new PoolPoolInfo(info.gets + 1, info.immediates, info.waits, info.totalWaitTime, info.maxWaitTime)); + } - private static void update(AtomicReference poolPoolInfo, Function f) { - for (;;) { - PoolPoolInfo oldInfo = poolPoolInfo.get(); - PoolPoolInfo newInfo = f.apply(oldInfo); - if (poolPoolInfo.compareAndSet(oldInfo, newInfo)) { - break; - } - } - } + public static void postUpdate(AtomicReference poolPoolInfo, long dt) { + update(poolPoolInfo, info -> new PoolPoolInfo(info.gets, info.immediates + (0 == dt ? 1 : 0), info.waits + (0 == dt ? 0 : 1), info.totalWaitTime + dt, Math.max(info.maxWaitTime, dt))); + } - private PoolPoolInfo(long gets, long immediates, long waits, long totalWaitTime, long maxWaitTime) { - this.gets = gets; - this.immediates = immediates; - this.waits = waits; - this.totalWaitTime = totalWaitTime; - this.maxWaitTime = maxWaitTime; + private static void update(AtomicReference poolPoolInfo, Function f) { + for (; ; ) { + PoolPoolInfo oldInfo = poolPoolInfo.get(); + PoolPoolInfo newInfo = f.apply(oldInfo); + if (poolPoolInfo.compareAndSet(oldInfo, newInfo)) { + break; + } } + } - @Override - public String toString() { - return String.format("%4d gets (%4d immediates %4d waits %8d ms totalWait, %8d ms max-wait)", gets, immediates, waits, totalWaitTime, maxWaitTime); - } + @SuppressWarnings("NullableProblems") + @Override + public String toString() { + return String.format("%4d gets (%4d immediates %4d waits %8d ms totalWait, %8d ms max-wait)", gets, immediates, waits, totalWaitTime, maxWaitTime); } } } diff --git a/src/main/java/org/modelingvalue/dclare/OneShotTracer.java b/src/main/java/org/modelingvalue/dclare/OneShotTracer.java new file mode 100644 index 00000000..4084adc1 --- /dev/null +++ b/src/main/java/org/modelingvalue/dclare/OneShotTracer.java @@ -0,0 +1,132 @@ +package org.modelingvalue.dclare; + +import org.modelingvalue.dclare.OneShot.PoolPoolInfo; + +public interface OneShotTracer { + boolean TRACE_ONE_SHOT = Boolean.getBoolean("TRACE_ONE_SHOT"); + boolean NO_POOL_POOL_TRACE = Boolean.getBoolean("NO_POOL_POOL_TRACE"); + + void traceStart(String oneShotName, int numActions); + + void traceDone(String oneShotName, long durationMs); + + void traceCacheSkip(String oneShotName, Object actionId); + + void traceActionBegin(String oneShotName, Object actionId); + + void traceCacheWrite(String oneShotName, Object actionId); + + void traceActionEnd(String oneShotName, Object actionId, long overallMs, long methodMs, long rulesMs); + + void tracePoolPoolInit(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo); + + void tracePoolPoolGet(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo); + + void tracePoolPoolTimeout(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo); + + void tracePoolPoolWaited(String threadName, long waitedMs, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo); + + void tracePoolPoolNotBusy(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo); + + void tracePoolPoolDone(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo); + + void tracePoolPoolAlarmStuck(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo, long durationMs, String poolName); + + void tracePoolPoolMonitorQuit(); + + class ToStderr implements OneShotTracer { + @Override + public void traceStart(String oneShotName, int numActions) { + if (TRACE_ONE_SHOT) { + System.err.printf("TRACE_ONE_SHOT: %-12s %-40s - #actions=%d\n", "START", oneShotName, numActions); + } + } + + @Override + public void traceDone(String oneShotName, long durationMs) { + if (TRACE_ONE_SHOT) { + System.err.printf("TRACE_ONE_SHOT: %-12s %-40s - duration=%5d ms\n", "DONE", oneShotName, durationMs); + } + } + + @Override + public void traceCacheSkip(String oneShotName, Object actionId) { + if (TRACE_ONE_SHOT) { + System.err.printf("TRACE_ONE_SHOT: %-12s %-40s - %s\n", "CACHE-SKIP", oneShotName, actionId); + } + } + + @Override + public void traceActionBegin(String oneShotName, Object actionId) { + if (TRACE_ONE_SHOT) { + System.err.printf("TRACE_ONE_SHOT: %-12s %-40s - %s\n", "ACTION-BEGIN", oneShotName, actionId); + } + } + + @Override + public void traceCacheWrite(String oneShotName, Object actionId) { + if (TRACE_ONE_SHOT) { + System.err.printf("TRACE_ONE_SHOT: %-12s %-40s - %s\n", "CACHE-WRITE", oneShotName, actionId); + } + } + + @Override + public void traceActionEnd(String oneShotName, Object actionId, long overallMs, long methodMs, long rulesMs) { + if (TRACE_ONE_SHOT) { + System.err.printf("TRACE_ONE_SHOT: %-12s %-40s - %-25s took %5d ms (m+r=%5d + %5d)\n", "ACTION-END", oneShotName, actionId, overallMs, methodMs, rulesMs); + } + } + + @Override + public void tracePoolPoolInit(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo) { + if (!NO_POOL_POOL_TRACE) { + System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", threadName, "PP_INIT", idleCount, busyCount, poolPoolInfo); + } + } + + @Override + public void tracePoolPoolGet(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo) { + if (!NO_POOL_POOL_TRACE) { + System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", threadName, "PP_GET", idleCount, busyCount, poolPoolInfo); + } + } + + @Override + public void tracePoolPoolTimeout(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo) { + if (!NO_POOL_POOL_TRACE) { + System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", threadName, "PP_TIMEOUT", idleCount, busyCount, poolPoolInfo); + } + } + + @Override + public void tracePoolPoolWaited(String threadName, long waitedMs, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo) { + if (!NO_POOL_POOL_TRACE) { + System.err.printf("TRACE: ContextPoolPool: [%-25s] waited %6d ms : idle/busy=%3d/%3d: %s\n", threadName, waitedMs, idleCount, busyCount, poolPoolInfo); + } + } + + @Override + public void tracePoolPoolNotBusy(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo) { + if (!NO_POOL_POOL_TRACE) { + System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", threadName, "PP_NOT_BUSY", idleCount, busyCount, poolPoolInfo); + } + } + + @Override + public void tracePoolPoolDone(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo) { + if (!NO_POOL_POOL_TRACE) { + System.err.printf("TRACE: ContextPoolPool: [%-25s] %-25s: idle/busy=%3d/%3d: %s\n", threadName, "PP_DONE", idleCount, busyCount, poolPoolInfo); + } + } + + @Override + public void tracePoolPoolAlarmStuck(String threadName, int idleCount, int busyCount, PoolPoolInfo poolPoolInfo, long durationMs, String poolName) { + System.err.printf("ALARM: ContextPool probably stuck (busy for %-8d ms): %s\n", durationMs, poolName); + } + + @Override + public void tracePoolPoolMonitorQuit() { + System.err.print("ALARM: PoolPool monitor interupted and quit\n"); + } + } +} From b02f9adfd1867b6afa3f50d81ca9ecaf7e922828 Mon Sep 17 00:00:00 2001 From: automation Date: Fri, 6 Mar 2026 19:08:52 +0000 Subject: [PATCH 175/179] [no-ci] updated by mvgplugin --- .../modelingvalue/dclare/OneShotTracer.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/org/modelingvalue/dclare/OneShotTracer.java b/src/main/java/org/modelingvalue/dclare/OneShotTracer.java index 4084adc1..f3b464c0 100644 --- a/src/main/java/org/modelingvalue/dclare/OneShotTracer.java +++ b/src/main/java/org/modelingvalue/dclare/OneShotTracer.java @@ -1,3 +1,23 @@ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// (C) Copyright 2018-2026 Modeling Value Group B.V. (http://modelingvalue.org) ~ +// ~ +// Licensed under the GNU Lesser General Public License v3.0 (the 'License'). You may not use this file except in ~ +// compliance with the License. You may obtain a copy of the License at: https://choosealicense.com/licenses/lgpl-3.0 ~ +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ~ +// an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the ~ +// specific language governing permissions and limitations under the License. ~ +// ~ +// Maintainers: ~ +// Wim Bast, Tom Brus ~ +// ~ +// Contributors: ~ +// Ronald Krijgsheld ✝, Arjan Kok, Carel Bast ~ +// --------------------------------------------------------------------------------------------------------------------- ~ +// In Memory of Ronald Krijgsheld, 1972 - 2023 ~ +// Ronald was suddenly and unexpectedly taken from us. He was not only our long-term colleague and team member ~ +// but also our friend. "He will live on in many of the lines of code you see below." ~ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + package org.modelingvalue.dclare; import org.modelingvalue.dclare.OneShot.PoolPoolInfo; From 0ae980dbdda99974d206bf6bef8ba93c6062b1aa Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Mon, 9 Mar 2026 08:21:50 +0100 Subject: [PATCH 176/179] fix memory leak due to unstopped ConstantStates --- src/main/java/org/modelingvalue/dclare/ConstantState.java | 2 +- .../java/org/modelingvalue/dclare/UniverseTransaction.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/modelingvalue/dclare/ConstantState.java b/src/main/java/org/modelingvalue/dclare/ConstantState.java index 9dc2d488..1a2eb97b 100644 --- a/src/main/java/org/modelingvalue/dclare/ConstantState.java +++ b/src/main/java/org/modelingvalue/dclare/ConstantState.java @@ -289,7 +289,7 @@ public ConstantState(String name, Consumer errorHandler) { } } } - }, "ConstantState.remover"); + }, "ConstantState.remover-" + name); remover.setDaemon(true); remover.start(); } diff --git a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java index 028cd229..d64de13e 100644 --- a/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java +++ b/src/main/java/org/modelingvalue/dclare/UniverseTransaction.java @@ -312,6 +312,9 @@ public void run() { stop(); history = history.append(state); constantState.stop(); + if (pullConstantState != null) { + pullConstantState.stop(); + } end(state); //TODO wire onto MoodManager stopped = true; //TODO wire onto MoodManager setStoppedMood(state); @@ -467,6 +470,10 @@ protected State run(State state) { } while (priority != null); return state; } finally { + if (tmpConstants != null) { + tmpConstants.stop(); + tmpConstants = null; + } postState = null; preStartStates.setState(emptyState); startStates.setState(emptyState); From fa23fbb278ade8b1554c70d8ec6a28509890afd2 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Wed, 25 Mar 2026 16:35:21 +0100 Subject: [PATCH 177/179] bump gradle version --- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dbc3ce4a..c61a118f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 0262dcbd..739907df 100755 --- a/gradlew +++ b/gradlew @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. From 0d3f52fb715cd836753ea525a1bbeeedf6c28a30 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Wed, 20 May 2026 09:43:17 +0200 Subject: [PATCH 178/179] update gradle --- gradle/wrapper/gradle-wrapper.jar | Bin 48966 -> 48462 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++- gradlew | 2 +- gradlew.bat | 31 ++++++++--------------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d997cfc60f4cff0e7451d19d49a82fa986695d07..b1b8ef56b44f16b14dc800fa8103a6d89abb526f 100644 GIT binary patch delta 39760 zcmXVX<6|9e({vi+geNu|+iq;Lv2FW=CpH_~Zfx7O8#Gqq^zH9{-Y?fbaLvr_?9PsS zLe9KG);pnsnwo2xi7~sprey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(*pSJp<{a2|Hzwgg)6Nd@@N-3S)|V0)mX e{Sg5G5zENPNVU~b5#<2@M#Os+0czL&{q{eZe&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,7 +65,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line @@ -73,21 +73,10 @@ goto fail @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% From dd1e5ec7b94d299b966a7bfb243bb4c5e5f950b8 Mon Sep 17 00:00:00 2001 From: Tom Brus Date: Thu, 21 May 2026 23:01:21 +0200 Subject: [PATCH 179/179] prepare for release 6.0.0 --- build.gradle.kts | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7aef38c2..503a2cbc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,8 +28,8 @@ plugins { eclipse } dependencies { - implementation("org.modelingvalue:immutable-collections:4.1.0-BRANCHED") - implementation("org.modelingvalue:mvg-json:4.1.0-BRANCHED") + implementation("org.modelingvalue:immutable-collections:6.0.0-BRANCHED") + implementation("org.modelingvalue:mvg-json:6.0.0-BRANCHED") } publishing { publications { diff --git a/gradle.properties b/gradle.properties index 410a7699..4f6dada8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,5 +21,5 @@ # suppress inspection "UnusedProperty" for whole file group = org.modelingvalue artifact = dclare -version = 5.1.0 +version = 6.0.0 version_java = 21