Skip to content

Commit

Permalink
Test address
Browse files Browse the repository at this point in the history
  • Loading branch information
enzoveltri committed Nov 11, 2015
1 parent 16a28df commit 9b3fc7c
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<scenario>
<source/>
<target>
<type>DBMS</type>
<access-configuration>
<driver>org.postgresql.Driver</driver>
<uri>jdbc:postgresql:synthetic_11</uri>
<schema>target</schema>
<login>pguser</login>
<password>pguser</password>
</access-configuration>
<init-db>
<![CDATA[
create schema target;
SET search_path = target, pg_catalog;
create table t(
oid serial,
ssn varchar(50),
fname varchar(50),
minit varchar(50),
lname varchar(50),
stnum varchar(50),
stadd varchar(50),
apt varchar(50),
city varchar(50),
state varchar(50),
zip varchar(50)
);
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('731164764','Adrianne','B','Burneson','','PO Box 2638','','Vienna','VA','22184');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('211802526','Kehr','','Hak','864','Duston Ln','5w1','Kettle Falls','WA','99141');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('144283668','Serkland','P','Casasos','389','Knutz Road','6x5','Burr Oak','IA','52131');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('586816602','Knost','J','Abelardxxx','','PO Box 2440','','Flat','AK','99584');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('488252871','Shena','C','Lanning','613','Leiweke St','0p0','Lignum','VA','22726');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('484015225','Hsiaochiu','R','Banse','311','Spanogle Ave','0w0','Havana','AR','72842');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('687351100','Deerdre','','Varkel','659','Kellen Street','6i1','Bland','MO','65014');
insert into t(ssn,fname,minit,lname,stnum,stadd,apt,city,state,zip) values ('470425801','Hamamoto','J','Ahtye','703','Bernette Parkway','7g8','Appleton','WI','54914');
]]>
</init-db>
</target>
<dependencies>
<![CDATA[
ExtEGDs:
t(ssn: $s1, fname: $f1, minit: $m1, lname: $l1, stnum: $s2, stadd: $s3, apt: $a1, city: $c1, state: $s4, zip: $z1),
$a1 == "null", $m1 == "J", $s1 == "586816602" -> $l1 == "Abelard".
]]>
</dependencies>
<partialOrder/>
</scenario>

48 changes: 24 additions & 24 deletions lunaticEngine/test/it/unibas/lunatic/test/References.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class References {
public static final String algebra_employees = "algebra/employees-egd-mcscenario.xml";
// DE
public static final String expenseDB = "de/expenseDB/expenseDB-mcscenario.xml";

public static final String RS = "de/RS/RS-mcscenario.xml";
public static final String RS_tc = "de/RS/RS-tc-mcscenario.xml";
public static final String RS_tgd = "de/RS/RS-tgd-mcscenario-dbms.xml";
Expand All @@ -21,37 +21,37 @@ public class References {
public static final String RS_join_dbms = "de/RS/RS-join-mcscenario-dbms.xml";
public static final String RS_st_exttgd_egd = "de/RS/RS-st-exttgd-egd-mcscenario.xml";
public static final String RS_st_exttgd_egd_dbms = "de/RS/RS-st-exttgd-egd-mcscenario-dbms.xml";

public static final String bookPublisher = "de/bookPublisher/bookPublisher-mcscenario.xml";
public static final String bookPublisher_plain = "de/bookPublisher/bookPublisher-mcscenario-plain.xml";
public static final String bookPublisher_egd = "de/bookPublisher/bookPublisher-mcscenario-egd.xml";
public static final String bookPublisher_dbms = "de/bookPublisher/bookPublisher-mcscenario-dbms.xml";
public static final String bookPublisher_ded = "deds/bookPublisher/bookPublisher-unfolded-mcscenario.xml";

public static final String verticalPartition_10k_dbms = "de/verticalPartition/verticalPartition-10k-scenario-dbms.xml";
public static final String verticalPartition_100k_dbms = "de/verticalPartition/verticalPartition-100k-scenario-dbms.xml";

public static final String employees_rew = "de/employees/employees-rew-mcscenario.xml";
public static final String employees_egd = "de/employees/employees-egd-mcscenario.xml";
public static final String employees_dtgd = "de/employees/employees-dtgd-mcscenario.xml";
public static final String employees_rew_dbms = "de/employees/employees-rew-mcscenario-dbms.xml";
public static final String employees_egd_dbms = "de/employees/employees-egd-mcscenario-dbms.xml";
public static final String employees_dtgd_dbms = "de/employees/employees-dtgd-mcscenario-dbms.xml";

public static final String companies_rew = "de/companies/companies-rew-mcscenario.xml";
public static final String companies_rew_dbms = "de/companies/companies-rew-mcscenario-dbms.xml";

public static final String unfolding_employees = "de/unfolded/employees-unfolded.xml";

// MC
public static final String customers_cfd = "mc/customers/customers-cfd-mcscenario.xml";
public static final String customers_cfd_dbms = "mc/customers/customers-cfd-mcscenario-dbms.xml";

public static final String employees_comparisons = "mc/employees/employees-comparisons-mcscenario.xml";
public static final String employees_comparisons_dbms = "mc/employees/employees-comparisons-mcscenario-dbms.xml";
public static final String employees_comparisons_nosymmetric = "mc/employees/employees-comparisons-nosymmetric-mcscenario.xml";
public static final String employees_comparisons_nosymmetric_dbms = "mc/employees/employees-comparisons-nosymmetric-mcscenario-dbms.xml";

public static final String treatments = "mc/treatments/treatments-mcscenario.xml";
public static final String treatments_dbms = "mc/treatments/treatments-mcscenario-dbms.xml";
public static final String treatments_fr_sp = "mc/treatments/treatments-mcscenario-fr-sp.xml";
Expand All @@ -60,10 +60,9 @@ public class References {
public static final String treatments_fr_sp_script_dbms = "mc/treatments/treatments-mcscenario-fr-sp-script-dbms.xml";
public static final String treatments_fr_s5 = "mc/treatments/treatments-mcscenario-fr-s5.xml";
public static final String treatments_fr_s5_dbms = "mc/treatments/treatments-mcscenario-fr-s5-dbms.xml";
public static final String treatments_usermanager = "mc/treatments/treatments-mcscenario-usermanager.xml";
public static final String treatments_usermanager = "mc/treatments/treatments-mcscenario-usermanager.xml";
public static final String treatments_icde = "mc/treatments/treatments-mcscenario-icde.xml";


public static final String persons = "mc/persons/person-mcscenario.xml";
public static final String persons_deps = "mc/persons/person-deps-mcscenario.xml";
public static final String persons_deps_01 = "mc/persons/person-deps-01-mcscenario.xml";
Expand All @@ -81,7 +80,7 @@ public class References {
public static final String persons_deps_07 = "mc/persons/person-deps-07-mcscenario.xml";
public static final String persons_deps_08 = "mc/persons/person-deps-08-mcscenario.xml";
public static final String persons_fr_sp = "mc/persons/person-fr-sp-mcscenario.xml";

public static final String persons_deps_dbms = "mc/persons/person-deps-mcscenario-dbms.xml";
public static final String persons_dbms = "mc/persons/person-mcscenario-dbms.xml";
public static final String persons_deps_01_dbms = "mc/persons/person-deps-01-mcscenario-dbms.xml";
Expand All @@ -101,16 +100,16 @@ public class References {
public static final String persons_fr_sp_ground_dbms = "mc/persons/person-fr-sp-ground-mcscenario-dbms.xml";
public static final String persons_deps_greedy = "mc/persons/person-deps-greedy-mcscenario.xml";
public static final String persons_deps_greedy_dbms = "mc/persons/person-deps-greedy-mcscenario-dbms.xml";

public static final String persons_incremental_00 = "mc/incremental/person-00-mcscenario-dbms.xml";
public static final String persons_incremental_01 = "mc/incremental/person-01-mcscenario-dbms.xml";
public static final String persons_incremental_02 = "mc/incremental/person-02-mcscenario-dbms.xml";

public static final String flipflop = "mc/flipflop/flipflop-mcscenario.xml";
public static final String flipflop_dmbs = "mc/flipflop/flipflop-mcscenario-dbms.xml";
public static final String contraddicting = "mc/flipflop/contradictingcfd-mcscenario.xml";
public static final String contraddicting_dmbs = "mc/flipflop/contradictingcfd-mcscenario-dbms.xml";

public static final String synthetic_01 = "mc/synthetic/synthetic-01-mcscenario.xml";
public static final String synthetic_01_dbms = "mc/synthetic/synthetic-01-mcscenario-dbms.xml";
public static final String synthetic_02 = "mc/synthetic/synthetic-02-mcscenario.xml";
Expand All @@ -132,6 +131,7 @@ public class References {
public static final String synthetic_09 = "mc/synthetic/synthetic-09-mcscenario.xml";
public static final String synthetic_10 = "mc/synthetic/synthetic-10-mcscenario.xml";
public static final String synthetic_10_similarity = "mc/synthetic/synthetic-10-similarity-mcscenario.xml";
public static final String synthetic_11_dbms = "mc/synthetic/synthetic-11-mcscenario-dbms.xml";
public static final String synthetic_T01 = "mc/tgd/synthetic-T01-mcscenario.xml";
public static final String synthetic_T01_dbms = "mc/tgd/synthetic-T01-mcscenario-dbms.xml";
public static final String synthetic_T01Rew = "mc/tgd/synthetic-T01rew-mcscenario.xml";
Expand All @@ -157,16 +157,16 @@ public class References {
public static final String doctors_dbms = "mc/doctors/doctors-mcscenario-dbms.xml";
public static final String doctors_additional_dbms = "mc/doctors/doctors-additional-mcscenario-dbms.xml";
public static final String doctors_usermanager = "mc/doctors/doctors-usermanager-mcscenario.xml";

public static final String hospital = "mc/hospital/hospital-mcscenario.xml";
public static final String hospital_0_2p_dbms = "mc/hospital/hospital-0-2p-mcscenario-dbms.xml";
public static final String hospital_small_a_dbms = "mc/hospital/hospital-HighRep-small-a-dbms.xml";
public static final String hospital_small_b_dbms = "mc/hospital/hospital-HighRep-small-b-dbms.xml";

public static final String bus_30_5p_dbms = "mc/bus/bus-HighRep-30-5-dbms.xml";
public static final String bus_55_5p_dbms = "mc/bus/bus-HighRep-55-5-dbms.xml";
public static final String bus_100_5p_dbms = "mc/bus/bus-HighRep-100-5-dbms.xml";
public static final String hospital_0_2p_dbms = "mc/hospital/hospital-0-2p-mcscenario-dbms.xml";
public static final String hospital_small_a_dbms = "mc/hospital/hospital-HighRep-small-a-dbms.xml";
public static final String hospital_small_b_dbms = "mc/hospital/hospital-HighRep-small-b-dbms.xml";

public static final String bus_30_5p_dbms = "mc/bus/bus-HighRep-30-5-dbms.xml";
public static final String bus_55_5p_dbms = "mc/bus/bus-HighRep-55-5-dbms.xml";
public static final String bus_100_5p_dbms = "mc/bus/bus-HighRep-100-5-dbms.xml";

public static final String accuracy = "mc/accuracy/accuracy-mcscenario.xml";
public static final String accuracy_poset = "mc/accuracy/accuracy-poset-mcscenario.xml";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package it.unibas.lunatic.test.mc.mainmemory;

import it.unibas.lunatic.Scenario;
import it.unibas.lunatic.model.chase.chasemc.operators.ChaseMCScenario;
import it.unibas.lunatic.model.chase.chasemc.DeltaChaseStep;
import it.unibas.lunatic.model.chase.commons.ChaserFactory;
import it.unibas.lunatic.test.References;
import it.unibas.lunatic.test.UtilityTest;
import it.unibas.lunatic.test.checker.CheckExpectedSolutionsTest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestSynthetic11 extends CheckExpectedSolutionsTest {

private static Logger logger = LoggerFactory.getLogger(TestSynthetic11.class);

public void testScenario() throws Exception {
Scenario scenario = UtilityTest.loadScenarioFromResources(References.synthetic_11_dbms);
setConfigurationForTest(scenario);
// ChaserFactory.setDoBackward(false);
if (logger.isDebugEnabled()) logger.debug(scenario.toString());
ChaseMCScenario chaser = ChaserFactory.getChaser(scenario);
DeltaChaseStep result = chaser.doChase(scenario);
if (logger.isDebugEnabled()) logger.debug(result.toStringWithSort());
if (logger.isDebugEnabled()) logger.debug("Solutions: " + resultSizer.getPotentialSolutions(result));
if (logger.isDebugEnabled()) logger.debug("Duplicate solutions: " + resultSizer.getDuplicates(result));
}
}

0 comments on commit 9b3fc7c

Please sign in to comment.