Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1007392 // Test Integer Logic [dev.]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1928L/13K/42K).

!7

sS isSmallerOrEq = "hctmgjqkmpmopddh * *";
sS isGreaterOrEq = "emyajonmfdmoogrx * *";

sO solver;

p {
  solver = hotwire(#1007393);
  
  int a = randomExcl(0, 1000);
  int b = randomExcl(1000, 2000);
  printVars(+a, +b);
  assertTrue(checkStatement(format(isSmallerOrEq, a, b));
  assertFalse(checkStatement(format(isSmallerOrEq, b, a));
  assertFalse(checkStatement(format(isGreaterOrEq, a, b));
  assertTrue(checkStatement(format(isGreaterOrEq, b, a));
  print("OK");
}

sbool checkStatement(S bla) {
  print ("Checking: " + bla);
  ret isYes(callAnswerMethod(solver, bla));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007392
Snippet name: Test Integer Logic [dev.]
Eternal ID of this version: #1007392/5
Text MD5: 72a742ecf9589780a9d3abb4a32b6f63
Transpilation MD5: a08af96f1a56cc4f6fb89ba10ed72e8f
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-21 12:14:31
Source code size: 606 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 486 / 593
Version history: 4 change(s)
Referenced in: #1007393 - Integer Logic Solver