[LON-CAPA-cvs] cvs: loncom /homework lonr.pm

www www@source.lon-capa.org
Sat, 18 Apr 2009 13:18:58 -0000


www		Sat Apr 18 13:18:58 2009 EDT

  Modified files:              
    /loncom/homework	lonr.pm 
  Log:
  Command blacklist and library whitelist
  
  
Index: loncom/homework/lonr.pm
diff -u loncom/homework/lonr.pm:1.1 loncom/homework/lonr.pm:1.2
--- loncom/homework/lonr.pm:1.1	Fri Apr 17 00:34:51 2009
+++ loncom/homework/lonr.pm	Sat Apr 18 13:18:58 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Interface routines to R CAS
 #
-# $Id: lonr.pm,v 1.1 2009/04/17 00:34:51 www Exp $
+# $Id: lonr.pm,v 1.2 2009/04/18 13:18:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -61,11 +61,11 @@
 sub blacklisted {
     my ($cmd)=@_;
     foreach my $forbidden (
-        '\? ','\?','%i\d+','%o','batch','block'
-       ,'compil','concat','describe','display2d','file','inchar'
-       ,'includ','lisp','load','outchar','plot','quit'
-       ,'read','reset','save','stin','stout','stringout'
-       ,'system','translat','ttyoff','with_stdout','writefile'
+        'read\.table','scan','plot','X11','windows','quartz',
+        'postscript','pdf','png','jpeg',
+        'dev\.list','dev\.next','dev\.prev','dev\.set',
+        'dev\.off','dev\.copy','dev\.print','graphics\.off',
+        'library','package','source','sink','objects'
      ) {
 	if ($cmd=~/$forbidden/s) { return 1; }
     } 
@@ -73,12 +73,9 @@
 }
 
 sub r_allowed_libraries {
-   return (
-      "absimp","affine","atensor","atrig1","augmented_lagrangian","contrib_ode","ctensor","descriptive","diag",
-      "eigen","facexp","fft","fourie","functs","ggf","grobner","impdiff","ineq","interpol","itensor","lapack",
-      "lbfgs","lindstedt","linearalgebra","lsquares","makeOrders","mnewton","mchrpl","ntrig","orthopoly",
-      "quadpack","rducon","romberg","scifac","simplex","solve_rec","sqdnst","stats","sterling","sym","units",
-      "vect","zeilberger");
+   return ('boot','class','cluster','datasets','KernSmooth','MASS',
+           'methods','mgcv','nlme','nnet','rpart','spatial',
+           'splines','stats','stats4','survival');
 }
 
 sub r_is_allowed_library {