20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.functions.ApplyFunction;
22 import ca.uqac.lif.cep.functions.FunctionTree;
23 import ca.uqac.lif.cep.functions.StreamVariable;
24 import ca.uqac.lif.cep.io.Print;
25 import ca.uqac.lif.cep.tmf.Fork;
26 import ca.uqac.lif.cep.tmf.Pump;
27 import ca.uqac.lif.cep.tmf.QueueSource;
28 import ca.uqac.lif.cep.util.Booleans;
32 import static ca.uqac.lif.cep.Connector.connect;
46 public static void main(String[] args)
50 QueueSource qs =
new QueueSource().setEvents(
true,
false).loop(
true);
53 Pump pump =
new Pump();
54 Connector.connect(qs, pump);
68 ApplyFunction af =
new ApplyFunction(
new Expression());
69 connect(x1, 0, af, 0);
70 connect(x2, 0, af, 1);
71 connect(x3, 0, af, 2);
75 ExistentialVariable exists_x3 =
new ExistentialVariable();
76 connect(af, exists_x3);
77 ExistentialVariable exists_x2 =
new ExistentialVariable();
78 connect(exists_x3, exists_x2);
79 UniversalVariable forall_x1 =
new UniversalVariable();
80 connect(exists_x2, forall_x1);
84 Print p =
new Print();
85 Connector.connect(forall_x1, p);
97 protected static class Expression
extends FunctionTree
102 new FunctionTree(Booleans.and,
103 new FunctionTree(Booleans.or, StreamVariable.X, StreamVariable.Y),
104 new FunctionTree(Booleans.or,
105 new FunctionTree(Booleans.not, StreamVariable.X), StreamVariable.Z)
107 new FunctionTree(Booleans.or,
108 new FunctionTree(Booleans.not, StreamVariable.Y),
109 new FunctionTree(Booleans.not, StreamVariable.Z))
Shows how a specially designed pipeline can solve the satisfiability problem for True Quantified Bool...