Changeset: d8430e01e38d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d8430e01e38d
Added Files:
monetdb5/modules/mal/Tests/remote07.malC
Removed Files:
monetdb5/modules/mal/Tests/remote07.mal
Modified Files:
clients/R/MonetDB.R/man/mc.Rd
clients/R/MonetDB.R/man/monetdbRtype.Rd
monetdb5/mal/Tests/tst019.stable.out
monetdb5/mal/Tests/tst027.stable.out
monetdb5/mal/Tests/tst038.stable.out
monetdb5/mal/Tests/tst070.stable.out
monetdb5/mal/Tests/tst071.stable.out
monetdb5/mal/Tests/tst102.stable.out
monetdb5/mal/Tests/tst104.stable.out
monetdb5/mal/Tests/tst105.stable.out
monetdb5/mal/Tests/tst105a.stable.out
monetdb5/mal/Tests/tst106.stable.out
monetdb5/mal/Tests/tst115.stable.out
monetdb5/mal/Tests/tst150.stable.out
monetdb5/mal/Tests/tst161.stable.out
monetdb5/mal/Tests/tst162.stable.out
monetdb5/mal/Tests/tst163.stable.out
monetdb5/mal/Tests/tst611.stable.out
monetdb5/mal/Tests/tst755.stable.out
monetdb5/mal/Tests/tst760.stable.out
monetdb5/mal/mal_resolve.c
monetdb5/modules/mal/Tests/All
monetdb5/modules/mal/Tests/remote07.stable.out
monetdb5/optimizer/Tests/inline08.stable.out
monetdb5/optimizer/Tests/tst4700.stable.out
monetdb5/tests/BugDay_2005-10-06_4.9.3/Tests/ADT_not_available.SF-850137.stable.out
monetdb5/tests/BugDay_2005-10-06_4.9.3/Tests/split_inf_loop.SF-1161583.stable.out
monetdb5/tests/BugReports/Tests/lngssaretruncated.stable.out
monetdb5/tests/BugTracker/Tests/parser.SF-2051309.stable.out
sql/backends/monet5/Tests/rapi01.sql
sql/backends/monet5/Tests/rapi04.sql
sql/backends/monet5/Tests/rapi11.sql
Branch: newstorage
Log Message:
merged with default
diffs (truncated from 491 to 300 lines):
diff --git a/clients/R/MonetDB.R/man/mc.Rd b/clients/R/MonetDB.R/man/mc.Rd
--- a/clients/R/MonetDB.R/man/mc.Rd
+++ b/clients/R/MonetDB.R/man/mc.Rd
@@ -34,4 +34,3 @@ mc(dbname="demo", user="monetdb", passwo
\dontrun{
con <- mc(dbname="demo",hostname="localhost")
}}
-
diff --git a/clients/R/MonetDB.R/man/monetdbRtype.Rd
b/clients/R/MonetDB.R/man/monetdbRtype.Rd
--- a/clients/R/MonetDB.R/man/monetdbRtype.Rd
+++ b/clients/R/MonetDB.R/man/monetdbRtype.Rd
@@ -16,4 +16,4 @@
\value{
String containing the R data type for the DB data type, e.g.
\code{character} or \code{numeric}.
-}
\ No newline at end of file
+}
diff --git a/monetdb5/mal/Tests/tst019.stable.out
b/monetdb5/mal/Tests/tst019.stable.out
--- a/monetdb5/mal/Tests/tst019.stable.out
+++ b/monetdb5/mal/Tests/tst019.stable.out
@@ -56,7 +56,7 @@ function user.welcome5(lim:int) (X_2:str
i := 2;
return (w,i) := ("hello",2);
end user.welcome5;
-!TypeException:user.main[5]:'user.welcome2' undefined in: (x,y) :=
user.welcome2(1);
+!TypeException:user.main[5]:'user.welcome2' undefined in: (x:any,y:str) :=
user.welcome2(1:int);
function user.main():void;
y := user.welcome1(1);
io.print(y);
diff --git a/monetdb5/mal/Tests/tst027.stable.out
b/monetdb5/mal/Tests/tst027.stable.out
--- a/monetdb5/mal/Tests/tst027.stable.out
+++ b/monetdb5/mal/Tests/tst027.stable.out
@@ -20,7 +20,7 @@ stdout of test 'tst027` in directory 'mo
function user.test(s:str,b:bat[:oid,:any_1]...):void;
io.print(s);
end user.test;
-!TypeException:user.main[4]:'user.test' undefined in: user.test("hello",b,c);
+!TypeException:user.main[4]:'user.test' undefined in:
user.test("hello":str,b:bat[:oid,:int],c:bat[:oid,:int]);
function user.main():void;
#variable arguments are only allowed in patterns
b := bat.new(:oid,:int);
diff --git a/monetdb5/mal/Tests/tst038.stable.out
b/monetdb5/mal/Tests/tst038.stable.out
--- a/monetdb5/mal/Tests/tst038.stable.out
+++ b/monetdb5/mal/Tests/tst038.stable.out
@@ -20,9 +20,9 @@ stdout of test 'tst038` in directory 'mo
function user.tst2(b:bat[:oid,:any_1]):void;
bat.append(b,"hello");
end user.tst2;
-!TypeException:user.tst2[1]:'bat.append' undefined in: bat.append(b,"hello");
+!TypeException:user.tst2[1]:'bat.append' undefined in:
bat.append(b:bat[:oid,:int],"hello":str);
!MALException:user.tst2[0]:Error in cloned function
-!TypeException:user.main[4]:'user.tst2' undefined in: user.tst2(b);
+!TypeException:user.main[4]:'user.tst2' undefined in:
user.tst2(b:bat[:oid,:int]);
function user.main():void;
#test the capability to deal with unspecified bats.
b := bat.new(:oid,:int);
diff --git a/monetdb5/mal/Tests/tst070.stable.out
b/monetdb5/mal/Tests/tst070.stable.out
--- a/monetdb5/mal/Tests/tst070.stable.out
+++ b/monetdb5/mal/Tests/tst070.stable.out
@@ -17,7 +17,7 @@ stdout of test 'tst070` in directory 'mo
# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-12850/.s.monetdb.31390
# MonetDB/GIS module loaded
# MonetDB/SQL module loaded
-!TypeException:user.foo[1]:'user.point' undefined in: (x,y) := user.point(1);
+!TypeException:user.foo[1]:'user.point' undefined in: (x:any,y:any) :=
user.point(1:int);
function user.foo():void;
(x,y) := user.point(1);
(initial:str,surname:str) := user.getName();
diff --git a/monetdb5/mal/Tests/tst071.stable.out
b/monetdb5/mal/Tests/tst071.stable.out
--- a/monetdb5/mal/Tests/tst071.stable.out
+++ b/monetdb5/mal/Tests/tst071.stable.out
@@ -23,7 +23,7 @@ function user.swap(x:int,y:int) (a:int,b
b := x;
return (a,b) := (a,b);
end user.swap;
-!TypeException:user.main[5]:'user.swap' undefined in: a := user.swap(3,4);
+!TypeException:user.main[5]:'user.swap' undefined in: a:any :=
user.swap(3:int,4:int);
function user.main():void;
# parsing operations with multi-assignments
(x,y) := user.swap(1,2);
diff --git a/monetdb5/mal/Tests/tst102.stable.out
b/monetdb5/mal/Tests/tst102.stable.out
--- a/monetdb5/mal/Tests/tst102.stable.out
+++ b/monetdb5/mal/Tests/tst102.stable.out
@@ -13,7 +13,7 @@ stdout of test 'tst102` in directory 'mo
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:33388/
command user.+(L:any_1,R:any_1):any_1 address addIntInt;
-!TypeException:user.main[2]:'calc.+' undefined in: a := calc.+(1,"hello");
+!TypeException:user.main[2]:'calc.+' undefined in: a:any :=
calc.+(1:int,"hello":str);
function user.main():void;
# the calls are wrong, they violate the type constraint
a := calc.+(1,"hello");
diff --git a/monetdb5/mal/Tests/tst104.stable.out
b/monetdb5/mal/Tests/tst104.stable.out
--- a/monetdb5/mal/Tests/tst104.stable.out
+++ b/monetdb5/mal/Tests/tst104.stable.out
@@ -17,7 +17,7 @@ stdout of test 'tst104` in directory 'mo
# MonetDB/SQL module loaded
command user.f(a:any_1,b:bat[:any_1,:any_2],c:any_2):any_2 address dummy;
!TypeException:user.main[4]:object code for command user.f missing
-!TypeException:user.main[4]:'user.f' undefined in: a := user.f(1@0,b,"hello");
+!TypeException:user.main[4]:'user.f' undefined in: a:str :=
user.f(1@0:oid,b:bat[:oid,:str],"hello":str);
function user.main():void;
# check propagation of type variables over bats
# can be checked after bat module has been added
diff --git a/monetdb5/mal/Tests/tst105.stable.out
b/monetdb5/mal/Tests/tst105.stable.out
--- a/monetdb5/mal/Tests/tst105.stable.out
+++ b/monetdb5/mal/Tests/tst105.stable.out
@@ -14,7 +14,7 @@ stdout of test 'tst105` in directory 'mo
# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:33388/
command bat2.new(h:any_1,t:any_2):bat[:any_1,:any_2] address GDKbatnew;
!TypeException:user.main[3]:object code for command bat2.new missing
-!TypeException:user.main[3]:'bat2.new' undefined in: a := bat2.new(:oid,:int);
+!TypeException:user.main[3]:'bat2.new' undefined in: a:bat[:oid,:int] :=
bat2.new(:oid,:int);
function user.main():void;
# check propagation of type variables over bats
# can be checked after bat module has been added
diff --git a/monetdb5/mal/Tests/tst105a.stable.out
b/monetdb5/mal/Tests/tst105a.stable.out
--- a/monetdb5/mal/Tests/tst105a.stable.out
+++ b/monetdb5/mal/Tests/tst105a.stable.out
@@ -14,7 +14,7 @@ stdout of test 'tst105a` in directory 'm
# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:33388/
command bbp.new(h:any_1,t:any_2):bat[:any_1,:any_2] address GDKbatnew;
!TypeException:user.main[2]:object code for command bbp.new missing
-!TypeException:user.main[2]:'bbp.new' undefined in: b := bbp.new(:str,:int);
+!TypeException:user.main[2]:'bbp.new' undefined in: b:bat[:str,:int] :=
bbp.new(:str,:int);
function user.main():void;
# check classification of functions in the proper module
b := bbp.new(:str,:int);
diff --git a/monetdb5/mal/Tests/tst106.stable.out
b/monetdb5/mal/Tests/tst106.stable.out
--- a/monetdb5/mal/Tests/tst106.stable.out
+++ b/monetdb5/mal/Tests/tst106.stable.out
@@ -13,7 +13,7 @@ stdout of test 'tst106` in directory 'mo
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:33388/
command user.f(a:any_1,b:any_2,c:any_1):bat[:any_1,:any_2] address f;
-!TypeException:user.main[2]:'user.f' undefined in: b := user.f(1,2,"help");
+!TypeException:user.main[2]:'user.f' undefined in: b:any :=
user.f(1:int,2:int,"help":str);
function user.main():void;
# check in-compatible polmorphic types
b := user.f(1,2,"help");
diff --git a/monetdb5/mal/Tests/tst115.stable.out
b/monetdb5/mal/Tests/tst115.stable.out
--- a/monetdb5/mal/Tests/tst115.stable.out
+++ b/monetdb5/mal/Tests/tst115.stable.out
@@ -28,7 +28,7 @@ function user.doitTwice(i:int):int;
i := calc.+(j,k);
return doitTwice := i;
end user.doitTwice;
-!TypeException:user.main[7]:'user.doitTwice' undefined in: d :=
user.doitTwice("wrong");
+!TypeException:user.main[7]:'user.doitTwice' undefined in: d:int :=
user.doitTwice("wrong":str);
function user.main():void;
# the next step is to trace the call of a mal function call
a := 1;
diff --git a/monetdb5/mal/Tests/tst150.stable.out
b/monetdb5/mal/Tests/tst150.stable.out
--- a/monetdb5/mal/Tests/tst150.stable.out
+++ b/monetdb5/mal/Tests/tst150.stable.out
@@ -23,7 +23,7 @@ function user.sample(nme:str,val:any_1):
y := io.print(val);
return sample := true;
end user.sample;
-!TypeException:user.main[1]:'user.sample' undefined in:
user.sample("hello","world");
+!TypeException:user.main[1]:'user.sample' undefined in:
user.sample("hello":str,"world":str);
function user.main():void;
user.sample("hello","world");
user.sample("hello",1);
diff --git a/monetdb5/mal/Tests/tst161.stable.out
b/monetdb5/mal/Tests/tst161.stable.out
--- a/monetdb5/mal/Tests/tst161.stable.out
+++ b/monetdb5/mal/Tests/tst161.stable.out
@@ -16,7 +16,7 @@ stdout of test 'tst161` in directory 'mo
function mytype.l():mytype;
return l := "0":mytype;
end mytype.l;
-!TypeException:user.main[2]:'mytype.l' undefined in: z := mytype.l();
+!TypeException:user.main[2]:'mytype.l' undefined in: z:mytype :=
mytype.l();
function user.main():void;
# testing definition of new atom type based on ptr
z := mytype.l();
diff --git a/monetdb5/mal/Tests/tst162.stable.out
b/monetdb5/mal/Tests/tst162.stable.out
--- a/monetdb5/mal/Tests/tst162.stable.out
+++ b/monetdb5/mal/Tests/tst162.stable.out
@@ -18,7 +18,7 @@ function strtype.l():strtype;
l := "1":strtype;
return l := nil:strtype;
end strtype.l;
-!TypeException:user.main[3]:'strtype.l' undefined in: z := strtype.l();
+!TypeException:user.main[3]:'strtype.l' undefined in: z:strtype :=
strtype.l();
function user.main():void;
# testing definition of new atom type based on ptr
# this definition caused an error
diff --git a/monetdb5/mal/Tests/tst163.stable.out
b/monetdb5/mal/Tests/tst163.stable.out
--- a/monetdb5/mal/Tests/tst163.stable.out
+++ b/monetdb5/mal/Tests/tst163.stable.out
@@ -14,7 +14,7 @@ stdout of test 'tst163` in directory 'mo
#atom myint:int;
#atom myint:int;
!TypeException:atomDefinition:Redefinition of atom 'myint'
-!TypeException:user.main[3]:'calc.+' undefined in: j := calc.+(i,3);
+!TypeException:user.main[3]:'calc.+' undefined in: j:any :=
calc.+(i:myint,3:int);
function user.main():void;
#multiple atomary types
i := "1":myint;
diff --git a/monetdb5/mal/Tests/tst611.stable.out
b/monetdb5/mal/Tests/tst611.stable.out
--- a/monetdb5/mal/Tests/tst611.stable.out
+++ b/monetdb5/mal/Tests/tst611.stable.out
@@ -17,7 +17,7 @@ stdout of test 'tst611` in directory 'mo
# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-12850/.s.monetdb.31390
# MonetDB/GIS module loaded
# MonetDB/SQL module loaded
-!TypeException:user.main[7]:'bat.setWriteMode' undefined in:
bat.setWriteMode(RKB);
+!TypeException:user.main[7]:'bat.setWriteMode' undefined in:
bat.setWriteMode(RKB:any);
function user.main():void;
# initialization of BATs on the stack
# caused a problem when executed in interactve mode
diff --git a/monetdb5/mal/Tests/tst755.stable.out
b/monetdb5/mal/Tests/tst755.stable.out
--- a/monetdb5/mal/Tests/tst755.stable.out
+++ b/monetdb5/mal/Tests/tst755.stable.out
@@ -23,9 +23,9 @@ function user.test(b:bat[:any_1,:any_2],
k := calc.+(1,"wrong");
io.print(k);
end user.test;
-!TypeException:user.test[1]:'calc.+' undefined in: k := calc.+(1,"wrong");
+!TypeException:user.test[1]:'calc.+' undefined in: k:any :=
calc.+(1:int,"wrong":str);
!MALException:user.test[0]:Error in cloned function
-!TypeException:user.main[5]:'user.test' undefined in: user.test(c,"hello");
+!TypeException:user.main[5]:'user.test' undefined in:
user.test(c:bat[:oid,:str],"hello":str);
function user.main():void;
# Polymorphic function tests
# Catching a pervasive error a.s.a.p.
diff --git a/monetdb5/mal/Tests/tst760.stable.out
b/monetdb5/mal/Tests/tst760.stable.out
--- a/monetdb5/mal/Tests/tst760.stable.out
+++ b/monetdb5/mal/Tests/tst760.stable.out
@@ -22,9 +22,9 @@ function user.test(b:bat[:any,:any_2],c:
k := calc.+(1,c);
io.print(k);
end user.test;
-!TypeException:user.test[1]:'calc.+' undefined in: k := calc.+(1,c);
+!TypeException:user.test[1]:'calc.+' undefined in: k:any :=
calc.+(1:int,c:str);
!MALException:user.test[0]:Error in cloned function
-!TypeException:user.main[4]:'user.test' undefined in: user.test(c,"hello");
+!TypeException:user.main[4]:'user.test' undefined in:
user.test(c:bat[:oid,:str],"hello":str);
function user.main():void;
# Polymorphic function tests
# Catching a dynamic error
diff --git a/monetdb5/mal/mal_resolve.c b/monetdb5/mal/mal_resolve.c
--- a/monetdb5/mal/mal_resolve.c
+++ b/monetdb5/mal/mal_resolve.c
@@ -58,7 +58,7 @@ polyInit(void)
p->token = CMDcall;
\
p->fcn = getSignature(s)->fcn; /* C
implementation mandatory */ \
if (p->fcn == NULL) {
\
- showScriptException(out, mb, getPC(mb,
p), TYPE, \
+ if(!silent) showScriptException(out,
mb, getPC(mb, p), TYPE, \
"object code for command %s.%s missing", \
p->modname, p->fcnname); \
p->typechk = TYPE_UNKNOWN;
\
@@ -411,7 +411,7 @@ findFunctionType(stream *out, Module sco
for (i = 0; i < p->retc; i++) {
int ts = returntype[i];
if (isVarConstant(mb, getArg(p, i))) {
- showScriptException(out, mb, getPC(mb, p),
TYPE, "Assignment to constant");
+ if( !silent) showScriptException(out, mb,
getPC(mb, p), TYPE, "Assignment to constant");
p->typechk = TYPE_UNKNOWN;
mb->errors++;
goto wrapup;
@@ -660,7 +660,7 @@ typeChecker(stream *out, Module scope, M
if (!silent) {
char *errsig;
- errsig = instruction2str(mb,0,p,(LIST_MAL_NAME
| LIST_MAL_VALUE));
+ errsig = instruction2str(mb,0,p,(LIST_MAL_NAME
| LIST_MAL_TYPE | LIST_MAL_VALUE));
showScriptException(out, mb, getPC(mb, p), TYPE,
"'%s%s%s' undefined in: %s",
(getModuleId(p) ? getModuleId(p) : ""),
@@ -675,7 +675,6 @@ typeChecker(stream *out, Module scope, M
return;
}
/*
- * @- Assignment
* When we arrive here the operator is an assignment.
* The language should also recognize (a,b):=(1,2);
* This is achieved by propagation of the rhs types to the lhs
@@ -736,7 +735,7 @@ typeChecker(stream *out, Module scope, M
}
/*
- * @- Function binder
+ * Function binder
* In some cases the front-end may already assure type correctness
* of the MAL instruction generated (e.g. the SQL front-end)
* In that case we merely have to locate the function address and
@@ -841,7 +840,7 @@ chkProgram(stream *out, Module s, MalBlk
}
/*
- * @- Polymorphic type analysis
+ * Polymorphic type analysis
* MAL provides for type variables of the form any$N. This feature
* supports polymorphic types, but also complicates the subsequent
* analysis. A variable typed with any$N not occuring in the function
diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list