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

10
LINES

< > BotCompany Repo | #1022382 // botEval_strictSafetyCheck

JavaX fragment (include)

static F1<S> botEval_strictSafetyCheck() {
  ret func(S code) -> S {
    S safety = joinWithComma(getCodeFragmentSafety(code));
    if (eq(safety, 'safe)) ret "";
    S s = "Sorry. Safety level is " + safety;
    Set<S> unknown = codeAnalysis_getUnknownIdentifiers(code);
    if (nempty(unknown)) s += ". Unknown identifiers: " + joinWithComma(unknown);
    ret s;
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022382
Snippet name: botEval_strictSafetyCheck
Eternal ID of this version: #1022382/1
Text MD5: 9e3239fe7ef6bae1eea67a4f6cea0444
Author: stefan
Category: javax / gazelle
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-16 13:32:37
Source code size: 380 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 317 / 340
Referenced in: [show references]