Skip to content

Commit 8e40629

Browse files
committed
default implementations in Lattice
1 parent 1853bdc commit 8e40629

File tree

1 file changed

+8
-4
lines changed
  • lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis

1 file changed

+8
-4
lines changed

lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/Lattice.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ default L lub(
153153
*
154154
* @throws SemanticException if an error occurs during the computation
155155
*/
156-
L upchain(
156+
default L upchain(
157157
L other)
158-
throws SemanticException;
158+
throws SemanticException {
159+
return lub(other);
160+
}
159161

160162
/**
161163
* Performs the upwards chain operation between this lattice element and the
@@ -291,9 +293,11 @@ default L glb(
291293
*
292294
* @throws SemanticException if an error occurs during the computation
293295
*/
294-
L downchain(
296+
default L downchain(
295297
L other)
296-
throws SemanticException;
298+
throws SemanticException {
299+
return glb(other);
300+
}
297301

298302
/**
299303
* Performs the downwards chain operation between this lattice element and

0 commit comments

Comments
 (0)