From b63e39349e344b17b4e011db038424acc450d2cd Mon Sep 17 00:00:00 2001 From: Zhen Zhang Date: Thu, 3 Oct 2019 10:46:50 -0700 Subject: [PATCH] Add a failed test --- examples/Makefile | 3 +++ examples/select-flatmap.ds | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 examples/select-flatmap.ds diff --git a/examples/Makefile b/examples/Makefile index bf2a9ee8..b4452375 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -19,6 +19,9 @@ TIMEOUT ?= 240 listcomp.h: listcomp-flatmap.ds cozy -t $(TIMEOUT) --allow-big-sets listcomp-flatmap.ds --c++ listcomp.h -p 8080 --verbose --save listcomp.synthesized +select.h: select-flatmap.ds + cozy -t $(TIMEOUT) --allow-big-sets select-flatmap.ds --c++ select.h -p 8080 --verbose --save select.synthesized + listcomp: listcomp.cpp listcomp.h g++ -std=c++11 -O3 -Werror '$<' -o '$@' diff --git a/examples/select-flatmap.ds b/examples/select-flatmap.ds new file mode 100644 index 00000000..bef68762 --- /dev/null +++ b/examples/select-flatmap.ds @@ -0,0 +1,25 @@ +SelectFlatmap: + type R = { + A: Int, + B: String + } + type S = { + B: String, + C: Int + } + type Q = { + B: String, + C: Int + } + type W = { + B: String, + C: Int + } + + state Rs : Bag + state Ss : Bag + state Qs : Bag + state Ws : Bag + + query q() + [ (r.A, s.C, q.B, w.C) | r <- Rs, s <- Ss, q <- Qs, w <- Ws, r.A == 15, q.B == w.B ]