Changeset: 7387fc3e8929 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7387fc3e8929
Added Files:
monetdb5/modules/mal/batmtime.mal
monetdb5/modules/mal/batmtime.mal.sh
Removed Files:
monetdb5/modules/kernel/batmtime.mal
Modified Files:
monetdb5/modules/kernel/Makefile.ag
monetdb5/modules/mal/Makefile.ag
Branch: default
Log Message:
Generate batmtime.mal with shell script and move to modules/mal.
In modules/mal, batmtime.mal is located next to batcalc.mal, whose
implementation it shares.
diffs (truncated from 666 to 300 lines):
diff --git a/monetdb5/modules/kernel/Makefile.ag
b/monetdb5/modules/kernel/Makefile.ag
--- a/monetdb5/modules/kernel/Makefile.ag
+++ b/monetdb5/modules/kernel/Makefile.ag
@@ -60,12 +60,12 @@ headers_mal = {
HEADERS = mal
DIR = libdir/monetdb5
SOURCES = bat5.mal algebra.mx status.mal unix.mal \
- mmath.mal lock.mal sema.mal alarm.mal batstr.mal batmtime.mal \
+ mmath.mal lock.mal sema.mal alarm.mal batstr.mal \
batcolor.mal batmmath.mal \
group.mx aggr.mx array.mal \
counters.mal logger.mal microbenchmark.mal
}
-EXTRA_DIST = aggr_ri.mx alarm.mal counters.mal lock.mal logger.mal
microbenchmark.mal sema.mal unix.mal batmtime.mal
+EXTRA_DIST = aggr_ri.mx alarm.mal counters.mal lock.mal logger.mal
microbenchmark.mal sema.mal unix.mal
EXTRA_DIST_DIR = Tests
diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -79,9 +79,14 @@ headers_mal = {
txtsim.mal recycle.mal \
cluster.mal trader.mal \
tokenizer.mal zorder.mal sample.mal \
- calc.mal batcalc.mal
+ calc.mal batcalc.mal batmtime.mal
}
-EXTRA_DIST = attach.mal batExtensions.mal iterator.mal constraints.mal
groupby.mal mal_init.mal manual.mal mkey.mal pcre.mal profiler.mal recycle.mal
remote.mal sabaoth.mal trader.mal transaction.mal txtsim.mal tablet.mal
tablet.h sample.mal mal_mapi.mal mat.mal tokenizer.mal pqueue.mal calc.mal
batcalc.mal
+EXTRA_DIST = attach.mal batExtensions.mal iterator.mal constraints.mal \
+ groupby.mal mal_init.mal manual.mal mkey.mal pcre.mal \
+ profiler.mal recycle.mal remote.mal sabaoth.mal trader.mal \
+ transaction.mal txtsim.mal tablet.mal tablet.h sample.mal \
+ mal_mapi.mal mat.mal tokenizer.mal pqueue.mal calc.mal \
+ batcalc.mal batmtime.mal
EXTRA_DIST_DIR = Tests
diff --git a/monetdb5/modules/kernel/batmtime.mal
b/monetdb5/modules/mal/batmtime.mal
rename from monetdb5/modules/kernel/batmtime.mal
rename to monetdb5/modules/mal/batmtime.mal
--- a/monetdb5/modules/kernel/batmtime.mal
+++ b/monetdb5/modules/mal/batmtime.mal
@@ -15,370 +15,199 @@
# Copyright August 2008-2012 MonetDB B.V.
# All Rights Reserved.
-command batcalc.==( l:bat[:oid,:date], r:bat[:oid,:date]) :bat[:oid,:bit]
+# This file was generated by using the script batmtime.mal.sh.
+
+module batcalc;
+
+command <(b1:bat[:oid,:date],b2:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatLT
+comment "Return B1 < B2";
+pattern <(b:bat[:oid,:date],v:date) :bat[:oid,:bit]
+address CMDbatLTcst
+comment "Return B < V";
+pattern <(v:date,b:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatLTcst
+comment "Return V < B";
+
+command <(b1:bat[:oid,:daytime],b2:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatLT
+comment "Return B1 < B2";
+pattern <(b:bat[:oid,:daytime],v:daytime) :bat[:oid,:bit]
+address CMDbatLTcst
+comment "Return B < V";
+pattern <(v:daytime,b:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatLTcst
+comment "Return V < B";
+
+command <(b1:bat[:oid,:timestamp],b2:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatLT
+comment "Return B1 < B2";
+pattern <(b:bat[:oid,:timestamp],v:timestamp) :bat[:oid,:bit]
+address CMDbatLTcst
+comment "Return B < V";
+pattern <(v:timestamp,b:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatLTcst
+comment "Return V < B";
+
+command <=(b1:bat[:oid,:date],b2:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatLE
+comment "Return B1 <= B2";
+pattern <=(b:bat[:oid,:date],v:date) :bat[:oid,:bit]
+address CMDbatLEcst
+comment "Return B <= V";
+pattern <=(v:date,b:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatLEcst
+comment "Return V <= B";
+
+command <=(b1:bat[:oid,:daytime],b2:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatLE
+comment "Return B1 <= B2";
+pattern <=(b:bat[:oid,:daytime],v:daytime) :bat[:oid,:bit]
+address CMDbatLEcst
+comment "Return B <= V";
+pattern <=(v:daytime,b:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatLEcst
+comment "Return V <= B";
+
+command <=(b1:bat[:oid,:timestamp],b2:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatLE
+comment "Return B1 <= B2";
+pattern <=(b:bat[:oid,:timestamp],v:timestamp) :bat[:oid,:bit]
+address CMDbatLEcst
+comment "Return B <= V";
+pattern <=(v:timestamp,b:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatLEcst
+comment "Return V <= B";
+
+command >(b1:bat[:oid,:date],b2:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatGT
+comment "Return B1 > B2";
+pattern >(b:bat[:oid,:date],v:date) :bat[:oid,:bit]
+address CMDbatGTcst
+comment "Return B > V";
+pattern >(v:date,b:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatGTcst
+comment "Return V > B";
+
+command >(b1:bat[:oid,:daytime],b2:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatGT
+comment "Return B1 > B2";
+pattern >(b:bat[:oid,:daytime],v:daytime) :bat[:oid,:bit]
+address CMDbatGTcst
+comment "Return B > V";
+pattern >(v:daytime,b:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatGTcst
+comment "Return V > B";
+
+command >(b1:bat[:oid,:timestamp],b2:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatGT
+comment "Return B1 > B2";
+pattern >(b:bat[:oid,:timestamp],v:timestamp) :bat[:oid,:bit]
+address CMDbatGTcst
+comment "Return B > V";
+pattern >(v:timestamp,b:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatGTcst
+comment "Return V > B";
+
+command >=(b1:bat[:oid,:date],b2:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatGE
+comment "Return B1 >= B2";
+pattern >=(b:bat[:oid,:date],v:date) :bat[:oid,:bit]
+address CMDbatGEcst
+comment "Return B >= V";
+pattern >=(v:date,b:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatGEcst
+comment "Return V >= B";
+
+command >=(b1:bat[:oid,:daytime],b2:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatGE
+comment "Return B1 >= B2";
+pattern >=(b:bat[:oid,:daytime],v:daytime) :bat[:oid,:bit]
+address CMDbatGEcst
+comment "Return B >= V";
+pattern >=(v:daytime,b:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatGEcst
+comment "Return V >= B";
+
+command >=(b1:bat[:oid,:timestamp],b2:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatGE
+comment "Return B1 >= B2";
+pattern >=(b:bat[:oid,:timestamp],v:timestamp) :bat[:oid,:bit]
+address CMDbatGEcst
+comment "Return B >= V";
+pattern >=(v:timestamp,b:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatGEcst
+comment "Return V >= B";
+
+command ==(b1:bat[:oid,:date],b2:bat[:oid,:date]) :bat[:oid,:bit]
address CMDbatEQ
-comment "Compare a bat of date against each other";
-pattern batcalc.==( l:bat[:oid,:date], r:date) :bat[:oid,:bit]
-address CMDbatEQcst;
-pattern batcalc.==(r:date, l:bat[:oid,:date]) :bat[:oid,:bit]
+comment "Return B1 == B2";
+pattern ==(b:bat[:oid,:date],v:date) :bat[:oid,:bit]
address CMDbatEQcst
-comment "Compare a bat of date against a singleton";
+comment "Return B == V";
+pattern ==(v:date,b:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatEQcst
+comment "Return V == B";
-command batcalc.!=( l:bat[:oid,:date], r:bat[:oid,:date]) :bat[:oid,:bit]
+command ==(b1:bat[:oid,:daytime],b2:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatEQ
+comment "Return B1 == B2";
+pattern ==(b:bat[:oid,:daytime],v:daytime) :bat[:oid,:bit]
+address CMDbatEQcst
+comment "Return B == V";
+pattern ==(v:daytime,b:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatEQcst
+comment "Return V == B";
+
+command ==(b1:bat[:oid,:timestamp],b2:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatEQ
+comment "Return B1 == B2";
+pattern ==(b:bat[:oid,:timestamp],v:timestamp) :bat[:oid,:bit]
+address CMDbatEQcst
+comment "Return B == V";
+pattern ==(v:timestamp,b:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatEQcst
+comment "Return V == B";
+
+command !=(b1:bat[:oid,:date],b2:bat[:oid,:date]) :bat[:oid,:bit]
address CMDbatNE
-comment "Compare a bat of date against each other";
-pattern batcalc.!=( l:bat[:oid,:date], r:date) :bat[:oid,:bit]
-address CMDbatNEcst;
-pattern batcalc.!=(r:date, l:bat[:oid,:date]) :bat[:oid,:bit]
+comment "Return B1 != B2";
+pattern !=(b:bat[:oid,:date],v:date) :bat[:oid,:bit]
address CMDbatNEcst
-comment "Compare a bat of date against a singleton";
+comment "Return B != V";
+pattern !=(v:date,b:bat[:oid,:date]) :bat[:oid,:bit]
+address CMDbatNEcst
+comment "Return V != B";
-command batcalc.<( l:bat[:oid,:date], r:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatLT
-comment "Compare a bat of date against each other";
-pattern batcalc.<( l:bat[:oid,:date], r:date) :bat[:oid,:bit]
-address CMDbatLTcst;
-pattern batcalc.<(r:date, l:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatLTcst
-comment "Compare a bat of date against a singleton";
+command !=(b1:bat[:oid,:daytime],b2:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatNE
+comment "Return B1 != B2";
+pattern !=(b:bat[:oid,:daytime],v:daytime) :bat[:oid,:bit]
+address CMDbatNEcst
+comment "Return B != V";
+pattern !=(v:daytime,b:bat[:oid,:daytime]) :bat[:oid,:bit]
+address CMDbatNEcst
+comment "Return V != B";
-command batcalc.<=( l:bat[:oid,:date], r:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatLE
-comment "Compare a bat of date against each other";
-pattern batcalc.<=( l:bat[:oid,:date], r:date) :bat[:oid,:bit]
-address CMDbatLEcst;
-pattern batcalc.<=(r:date, l:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatLEcst
-comment "Compare a bat of date against a singleton";
+command !=(b1:bat[:oid,:timestamp],b2:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatNE
+comment "Return B1 != B2";
+pattern !=(b:bat[:oid,:timestamp],v:timestamp) :bat[:oid,:bit]
+address CMDbatNEcst
+comment "Return B != V";
+pattern !=(v:timestamp,b:bat[:oid,:timestamp]) :bat[:oid,:bit]
+address CMDbatNEcst
+comment "Return V != B";
-command batcalc.>( l:bat[:oid,:date], r:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatGT
-comment "Compare a bat of date against each other";
-pattern batcalc.>( l:bat[:oid,:date], r:date) :bat[:oid,:bit]
-address CMDbatGTcst;
-pattern batcalc.>(r:date, l:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatGTcst
-comment "Compare a bat of date against a singleton";
-
-command batcalc.>=( l:bat[:oid,:date], r:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatGE
-comment "Compare a bat of date against each other";
-pattern batcalc.>=( l:bat[:oid,:date], r:date) :bat[:oid,:bit]
-address CMDbatGEcst;
-pattern batcalc.>=(r:date, l:bat[:oid,:date]) :bat[:oid,:bit]
-address CMDbatGEcst
-comment "Compare a bat of date against a singleton";
-
-command batcalc.==( l:bat[:oid,:daytime], r:bat[:oid,:daytime]) :bat[:oid,:bit]
-address CMDbatEQ
-comment "Compare a bat of daytime against each other";
-pattern batcalc.==( l:bat[:oid,:daytime], r:daytime) :bat[:oid,:bit]
-address CMDbatEQcst;
-pattern batcalc.==(r:daytime, l:bat[:oid,:daytime]) :bat[:oid,:bit]
-address CMDbatEQcst
-comment "Compare a bat of daytime against a singleton";
-
-command batcalc.!=( l:bat[:oid,:daytime], r:bat[:oid,:daytime]) :bat[:oid,:bit]
-address CMDbatNE
-comment "Compare a bat of daytime against each other";
-pattern batcalc.!=( l:bat[:oid,:daytime], r:daytime) :bat[:oid,:bit]
-address CMDbatNEcst;
-pattern batcalc.!=(r:daytime, l:bat[:oid,:daytime]) :bat[:oid,:bit]
-address CMDbatNEcst
-comment "Compare a bat of daytime against a singleton";
-
-command batcalc.<( l:bat[:oid,:daytime], r:bat[:oid,:daytime]) :bat[:oid,:bit]
-address CMDbatLT
-comment "Compare a bat of daytime against each other";
-pattern batcalc.<( l:bat[:oid,:daytime], r:daytime) :bat[:oid,:bit]
-address CMDbatLTcst;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list