# Sandbox restriction!

**URL:** <https://swi-prolog.discourse.group/t/sandbox-restriction/2242>\
**Category:** SWI-Prolog web site and services\
**Tags:** bug\
**Created:** [April 28, 2020, 12:14pm UTC](https://swi-prolog.discourse.group/t/sandbox-restriction/2242 "2020-04-28T12:14:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![smnmnkr](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@smnmnkr](https://swi-prolog.discourse.group/u/smnmnkr)\
**Post date:** [April 28, 2020, 12:14pm UTC](https://swi-prolog.discourse.group/t/sandbox-restriction/2242/1 "2020-04-28T12:14:45Z")

</div>

Greetings,

I am working on an educational project about Computational Semantics based on the book _" Representation and Inference for Natural Language"_ by Patrick Blackburn & Johan Bos.  
The goal is to implement a SWISH-Notebook that utilizes the lambda calculus and semantic/syntactic dummy grammar to interfere with logical consequences.

In my and most of the students local environments the code is working pretty good, but here in SWISH, I am running into some specific errors due to the restricted sandbox environment.

The two main queries that should work are `lambdaTestSuite.` and `betaConvertTestSuite.` which are now responding inhomogeneous and resulting in Sandbox restriction errors.

Thanks in advance!

Related SWISH-Notebook: [https://swish.swi-prolog.org/p/CompSem\_Petersen\_Material\_Kapitel\_2.swinb](https://swish.swi-prolog.org/p/CompSem_Petersen_Material_Kapitel_2.swinb)  
Full code source: [http://www.let.rug.nl/bos/comsem/software1.html](http://www.let.rug.nl/bos/comsem/software1.html)

---

<div class="post-metadata">

**Author:** ![smnmnkr](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@smnmnkr](https://swi-prolog.discourse.group/u/smnmnkr)\
**Post date:** [April 28, 2020, 12:50pm UTC](https://swi-prolog.discourse.group/t/sandbox-restriction/2242/3 "2020-04-28T12:50:00Z")

</div>

Sorry I misunderstood the meaning of the tag Logtalk.  
Thanks for the reply I’ve removed it.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [April 28, 2020, 1:51pm UTC](https://swi-prolog.discourse.group/t/sandbox-restriction/2242/5 "2020-04-28T13:51:52Z")

</div>

What is the goal we need to run to see the problem? I definitely see load\_shell/0, which is probably not going to be appreciated by the sandbox 🙂

---

<div class="post-metadata">

**Author:** ![smnmnkr](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@smnmnkr](https://swi-prolog.discourse.group/u/smnmnkr)\
**Post date:** [April 28, 2020, 3:10pm UTC](https://swi-prolog.discourse.group/t/sandbox-restriction/2242/6 "2020-04-28T15:10:39Z")

</div>

Thanks for the reply Jan.  
Is there a documentation available where I can look up sandbox disallowed commands?

If you run `lambdaTestSuite.`, you will end up with this sandbox error:

sandbox restriction!  
Could not derive which predicate may be called from  
np([coord:no,num:sg,gap:[],sem:A],B,C)  
np([coord:A,num:B,gap:[],sem:C],D,E)  
s([coord:no,sem:A],B,C)  
t([sem:A],B,[])  
setof(C,t([sem:C],D,[]),E)  
lambda(A,B)  
lambdaTestSuite

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [April 28, 2020, 3:36pm UTC](https://swi-prolog.discourse.group/t/sandbox-restriction/2242/7 "2020-04-28T15:36:09Z")

</div>

> [@smnmnkr](#):
>
> Could not derive which predicate may be called from

That is what bothers the sandbox. There is some meta call (call/N or something relying on that) where it cannot figure out what the goal is, so it doesn’t know what is called.

SWISH, as is, has limited support for higher order programming. It can typically do simple meta predicates where the predicate to be called appears in a argument. It does some search to figure out cases where the argument is a variable, but easily gives up. I don’t really see the meta-call, but I only has a quick look. You know the code better.
