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

10
LINES

< > BotCompany Repo | #1022382 // botEval_strictSafetyCheck

JavaX fragment (include)

1  
static F1<S> botEval_strictSafetyCheck() {
2  
  ret func(S code) -> S {
3  
    S safety = joinWithComma(getCodeFragmentSafety(code));
4  
    if (eq(safety, 'safe)) ret "";
5  
    S s = "Sorry. Safety level is " + safety;
6  
    Set<S> unknown = codeAnalysis_getUnknownIdentifiers(code);
7  
    if (nempty(unknown)) s += ". Unknown identifiers: " + joinWithComma(unknown);
8  
    ret s;
9  
  };
10  
}

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: 318 / 341
Referenced in: [show references]