一个内存数据库的源代码这是服务器端还有客户端
源代码在线查看: test_60.mal
# Monet Mil to Mal compiler # Copyright (c) 2001-2004, CWI. All rights reserved. #Predefined code segment #The compiler can not guarantee an accurate compilatioStatisticsn, #because MIL unlike MAL is a dynamically typed language. #A few guidelines to maximize usefullness. #- make the type of variables explicit, in particular 'nil' #- upon advice of M2m to remap identifiers, change it in your program directly #use the "mil_schema" for additioStatisticsnal support routines # io.print("setoid(oid(2000000));"); aa_a := oid(2000000); ba_a := setoid(aa_a); # io.print("# Testing effect on semijoin ordering\n"); ca_a := load("k10_unique1"); # io.print("var k10_unique1:= bat(\"k10_unique1\");"); k10_unique1 := new("k10_unique1"); # io.print("var c:= k10_unique1.select(0,9);"); c := select(k10_unique1,0,9); # io.print("printf(\"#~BeginVariableOutput~#\\n\"); cpuStatistics().print(); printf(\"#~EndVariableOutput~#\\n\");printf(\"#~BeginVariableOutput~#\\n\"); memStatisticsory().print(); printf(\"#~EndVariableOutput~#\\n\");printf(\"#~BeginVariableOutput~#\\n\"); ioStatistics().print(); printf(\"#~EndVariableOutput~#\\n\");"); da_a := printf("#~BeginVariableOutput~#\n"); ea_a := cpuStatistics(); fa_a := print(ea_a); ga_a := printf("#~EndVariableOutput~#\n"); ha_a := printf("#~BeginVariableOutput~#\n"); ia_a := status.memStatisticsStatistics(); ja_a := print(ia_a); ka_a := printf("#~EndVariableOutput~#\n"); la_a := printf("#~BeginVariableOutput~#\n"); ma_a := ioStatistics(); na_a := print(ma_a); oa_a := printf("#~EndVariableOutput~#\n"); # io.print("k10_unique1.semijoin(c);commit();"); pa_a := semijoin(k10_unique1,c); qa_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); ra_a := semijoin(k10_unique1,c); sa_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); ta_a := semijoin(k10_unique1,c); ua_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); va_a := semijoin(k10_unique1,c); wa_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); xa_a := semijoin(k10_unique1,c); ya_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); ab_a := semijoin(k10_unique1,c); bb_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); cb_a := semijoin(k10_unique1,c); db_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); eb_a := semijoin(k10_unique1,c); fb_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); gb_a := semijoin(k10_unique1,c); hb_a := commit(); # io.print("k10_unique1.semijoin(c);commit();"); ib_a := semijoin(k10_unique1,c); jb_a := commit(); # io.print("printf(\"#~BeginVariableOutput~#\\n\"); cpuStatistics().print(); printf(\"#~EndVariableOutput~#\\n\");printf(\"#~BeginVariableOutput~#\\n\"); memStatisticsory().print(); printf(\"#~EndVariableOutput~#\\n\");printf(\"#~BeginVariableOutput~#\\n\"); ioStatistics().print(); printf(\"#~EndVariableOutput~#\\n\");"); kb_a := printf("#~BeginVariableOutput~#\n"); lb_a := cpuStatistics(); mb_a := print(lb_a); nb_a := printf("#~EndVariableOutput~#\n"); ob_a := printf("#~BeginVariableOutput~#\n"); pb_a := status.memStatisticsStatistics(); qb_a := print(pb_a); rb_a := printf("#~EndVariableOutput~#\n"); sb_a := printf("#~BeginVariableOutput~#\n"); tb_a := ioStatistics(); ub_a := print(tb_a); vb_a := printf("#~EndVariableOutput~#\n"); # io.print("c.semijoin(k10_unique1);commit();"); wb_a := semijoin(c,k10_unique1); xb_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); yb_a := semijoin(c,k10_unique1); ac_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); bc_a := semijoin(c,k10_unique1); cc_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); dc_a := semijoin(c,k10_unique1); ec_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); fc_a := semijoin(c,k10_unique1); gc_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); hc_a := semijoin(c,k10_unique1); ic_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); jc_a := semijoin(c,k10_unique1); kc_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); lc_a := semijoin(c,k10_unique1); mc_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); nc_a := semijoin(c,k10_unique1); oc_a := commit(); # io.print("c.semijoin(k10_unique1);commit();"); pc_a := semijoin(c,k10_unique1); qc_a := commit(); # io.print("printf(\"#~BeginVariableOutput~#\\n\"); cpuStatistics().print(); printf(\"#~EndVariableOutput~#\\n\");printf(\"#~BeginVariableOutput~#\\n\"); memStatisticsory().print(); printf(\"#~EndVariableOutput~#\\n\");printf(\"#~BeginVariableOutput~#\\n\"); ioStatistics().print(); printf(\"#~EndVariableOutput~#\\n\");"); rc_a := printf("#~BeginVariableOutput~#\n"); sc_a := cpuStatistics(); tc_a := print(sc_a); uc_a := printf("#~EndVariableOutput~#\n"); vc_a := printf("#~BeginVariableOutput~#\n"); wc_a := status.memStatisticsStatistics(); xc_a := print(wc_a); yc_a := printf("#~EndVariableOutput~#\n"); ad_a := printf("#~BeginVariableOutput~#\n"); bd_a := ioStatistics(); cd_a := print(bd_a); dd_a := printf("#~EndVariableOutput~#\n"); # io.print("quit();"); ed_a := quit(); #Identifer 'memStatisticsory' mapped to 'status.memStatistics'