Warning: session_start(): open(/var/lib/php/sessions/sess_t8cjn6tcsc2uff9mjmq1gq4503, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
replace Var with ValuelessVar.
replace VarMap with Map.
abstract sclass Prop implements IStatement, IFieldsToList {}
static withToList record $HappensBefore$(A event1, B event2) extends Prop {}
static withToList record $HappensAtDay$(A event, B y) extends Prop {}
static withToList record $LessThan$(A x, B y) extends Prop {}
static withToList record $BiggerThanOrEqualTo$(A x, B y) extends Prop {}
static withToList record $AnyIntBiggerThan(O x) {}
static withToList record $is$(O a, O b) {}
// full define $LessThan(int x, int y) = x < y;
static Bool checkProposition(Prop p) {
if p is $LessThan$(int x, int y) { ret x < y; }
if p is $BiggerThanOrEqualTo$(int x, int y) {
ret not(checkProposition($LessThan$(x, y)));
}
null;
}
static VarMap fillVariablesInProposition(Prop p) {
if p is $LessThan$(int x, Var y) {
$AnyIntBiggerThan
}
}
p-exp {
assertEqualsVerbose(true, checkProposition($LessThan$(1, 5)));
assertEqualsVerbose(false, checkProposition($LessThan$(5, 1)));
assertEqualsVerbose(null, checkProposition($LessThan$("what", "ever")));
assertEqualsVerbose(false, checkProposition($BiggerThanOrEqualTo$(1, 5)));
assertEqualsVerbose(true, checkProposition($BiggerThanOrEqualTo$(5, 1)));
assertEqualsVerbose(null, checkProposition($BiggerThanOrEqualTo$("what", "ever")));
}