-
Notifications
You must be signed in to change notification settings - Fork 5
/
lattice.mjs
19 lines (18 loc) · 880 Bytes
/
lattice.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import {ArraySet} from './common.mjs';
export const BOT = Object.create(null); // should be 'const', but gives problems with rebuilding
BOT.join = function (other) { return other };
BOT.update = function (other) { return other };
BOT.meet = function (other) { return BOT };
BOT.hashCode = function () { return 0 };
BOT.equals = function (x) { return x === BOT };
BOT.subsumes = function (x) { return x === BOT };
BOT.isAddress = function () { return false };
BOT.addresses = function () { return ArraySet.empty() };
BOT.isTrue = function () { return false };
BOT.isFalse = function () { return false };
BOT.isDefined = function () { return false };
BOT.isUndefined = function () { return false };
BOT.conc = function () { return [] };
BOT.toString = function () { return "_" };
BOT.nice = function () { return "_" };
BOT.abst = function () { throw new Error("cannot abstract _")}