260 lines
9.0 KiB
Plaintext
260 lines
9.0 KiB
Plaintext
Database : ghent
|
|
Restore : YES
|
|
|
|
Operator : reportpattern
|
|
Number : 1
|
|
Signature: (symbol x stream(mset))+ X (tuple ->bool)+ -> (stream(tuple (mset, ...)))
|
|
Example : query 1
|
|
Result : 1
|
|
Remark : query Trains feedproject[Trip] addcounter[Cnt, 0] projectextend[;Id:.Cnt, Path:.Trip] reportpattern[a:emptymset(), b:emptymset(), c:emptymset(); tconstraint("a", "b", later), tconstraint("b","c", later); TRUE ]
|
|
|
|
Operator : gpattern
|
|
Number : 1
|
|
Signature: stream(tuple) x (tuple -> int ) x (tuple -> mbool ) x duration x int x {exactly, atleast} -> stream(mset)
|
|
Example : query Players feed gpattern[.PlayerId, derivative(distance(.Trip, center(PoliceStation))) <= 0.0, create_duration(0, 60000), 4, exactly] namedtransformstream[BackToPoliceStation] consume
|
|
Result : ()
|
|
|
|
Operator : crosspattern
|
|
Number : 1
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase1 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 2000000), 4, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : file
|
|
Remark : TestCase1: Add undef gaps in the Accumlator
|
|
|
|
Operator : crosspattern
|
|
Number : 2
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase2 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 2000000), 4, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : file
|
|
Remark : TestCase2: Insert units in the middle of Accumlator having too few nodes
|
|
|
|
Operator : crosspattern
|
|
Number : 3
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase3 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 2000000), 4, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : file
|
|
Remark : TestCase3: Repeat some pairs in the input
|
|
|
|
Operator : crosspattern
|
|
Number : 4
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase4 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 1800000), 3, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : file
|
|
Remark : TestCase4: Add short node membership in the input
|
|
|
|
Operator : crosspattern
|
|
Number : 5
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase5 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 1800000), 5, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : ((rel(tuple((elem mset)(Cnt int))))())
|
|
Remark : TestCase5: NewlyAdded -> RemoveNow
|
|
|
|
Operator : crosspattern
|
|
Number : 6
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase6 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 1800000), 5, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : file
|
|
Remark : TestCase5: NewlyAdded -> SplitFromExistingComponent
|
|
|
|
Operator : crosspattern
|
|
Number : 7
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query crosspatternCase6 feed crosspattern[.IDa, .IDb, passmbool(.Pred), create_duration(0, 1800000), 4, cc] transformstream addcounter[Cnt,1] consume;
|
|
Result : file
|
|
Remark : TestCase5: AddedEdges -> SplitFromExistingComponent
|
|
|
|
Operator : crosspattern
|
|
Number : 8
|
|
Signature: stream(tuple) X tuple->int X tuple->int X tuple->mbool X duration X int X {cc, clique} -> stream(mset)
|
|
Example : query PlayersJoined feed crosspattern[.PlayerId_a, .PlayerId_b, .Dist < DIST_THRESHOLD, TWO_MIN , 2, cc] namedtransformstream[Group] addcounter[GroupID,1] consume;
|
|
Result : file
|
|
Remark : TestCase8: The Ghent city game scenario
|
|
|
|
Operator : emptymset
|
|
Number : 1
|
|
Signature: -> mset
|
|
Example : query emptymset()
|
|
Result : (mset ())
|
|
|
|
Operator : components
|
|
Number : 1
|
|
Signature: intset -> stream(int)
|
|
Example : query components(thief) count
|
|
Result : 1
|
|
|
|
#Operator : intstream2set
|
|
#Number : 1
|
|
#Signature: stream x symbol -> elemset
|
|
#Example : query 1
|
|
#Result : 1
|
|
#Remark : query intstream(1, 10) transformstream intstream2set[elem] consume
|
|
|
|
Operator : mbool2mset
|
|
Number : 1
|
|
Signature: mbool x int -> mset
|
|
Example : query units(randommbool(now()) mbool2mset[7]) count > 1
|
|
Result : TRUE
|
|
|
|
Operator : union
|
|
Number : 1
|
|
Signature: mset x mset -> mset
|
|
Example : query groups feed aggregateB[Group; fun(g1: mset, g2:mset) g1 union g2; emptymset()]
|
|
Result : (mset ())
|
|
|
|
Operator : union2
|
|
Number : 1
|
|
Signature: mset x mset -> mset
|
|
Example : query no_components(groups feed aggregateB[Group; fun(g1: mset, g2:mset) g1 union2 g2; emptymset()])
|
|
Result : 11
|
|
|
|
Operator : -
|
|
Number : 1
|
|
Signature: mset x mset -> mset
|
|
Example : query no_components(groups feed aggregateB[Group; fun(g1: mset, g2:mset) g1 - g2; emptymset()])
|
|
Result : 0
|
|
|
|
Operator : -
|
|
Number : 2
|
|
Signature: intset x intset -> intset
|
|
Example : query intstream(1, 10) collectintset - intstream(5,10) collectintset
|
|
Result : (mset (1 2 3 4))
|
|
|
|
Operator : =
|
|
Number : 1
|
|
Signature: mset x mset -> bool
|
|
Example : query thief = [const intset value (167412)]
|
|
Result : TRUE
|
|
|
|
Operator : =
|
|
Number : 2
|
|
Signature: intset x intset -> bool
|
|
Example : query intstream(1, 3) collectintset = [const intset value (1 2 3)]
|
|
Result : TRUE
|
|
|
|
Operator : #
|
|
Number : 1
|
|
Signature: mset x mset -> bool
|
|
Example : query (groups feed extract[Group]) # emptymset()
|
|
Result : TRUE
|
|
|
|
Operator : #
|
|
Number : 2
|
|
Signature: intset x intset -> bool
|
|
Example : query intstream(1, 3) collectintset # [const intset value (1 2 3)]
|
|
Result : FALSE
|
|
|
|
|
|
Operator : cardinality
|
|
Number : 1
|
|
Signature: mset -> mint
|
|
Example : query maximum(cardinality(groups feed extract[Group]))
|
|
Result : 4
|
|
|
|
Operator : boundingregion
|
|
Number : 1
|
|
Signature: stream(tuple(int, mpoint)) x uset x duration -> mregion
|
|
Example : query 1
|
|
Result : 1
|
|
Remark : query boundingregion(Players feed project[PlayerId, Trip], SampleMSet, create_duration(0, 10000))
|
|
|
|
Operator : members
|
|
Number : 1
|
|
Signature: stream(tuple(int, mpoint)) x mset x bool -> mregion
|
|
Example : query members(Players feed project[PlayerId, Trip], SampleMSet, TRUE) count
|
|
Result : 4
|
|
|
|
Operator : the_mvalue
|
|
Number : 7
|
|
Signature: (stream uset) -> mset
|
|
Example : query (units(groups feed extract[Group]) the_mvalue) = (groups feed extract[Group])
|
|
Result : TRUE
|
|
|
|
Operator : collectintset
|
|
Number : 1
|
|
Signature: (stream int) -> intset
|
|
Example : query intstream(1,3) collectintset = [const intset value (1 2 3)]
|
|
Result : TRUE
|
|
|
|
Operator : no_components
|
|
Number : 1
|
|
Signature: mset -> int
|
|
Example : query no_components(groups feed extract[Group])
|
|
Result : 5
|
|
|
|
Operator : issubset
|
|
Number : 1
|
|
Signature: mset x mset -> mbool
|
|
Example : query groups feed {a} groups feed {b} symmjoin[sometimes(.Group_a issubset ..Group_b)] count
|
|
Result : 7
|
|
|
|
Operator : issubset
|
|
Number : 2
|
|
Signature: uset x uset -> mbool
|
|
Example : query groups feed {a} groups feed {b} symmjoin[sometimes(.Group_a issubset ..Group_b)] count
|
|
Result : 7
|
|
|
|
|
|
Operator : convexhull2
|
|
Number : 1
|
|
Signature: stream(truple(int, mpoint)) x mset x duration -> movingregion
|
|
Example : query 1
|
|
Result : 1
|
|
Remark : query speed(train7)>15 mbool2mset(7) cardinality max
|
|
|
|
Operator : the_unit
|
|
Number : 1
|
|
Signature: intset instant instant bool bool --> uset
|
|
Example : query 1
|
|
Result : 1
|
|
Remark : query ten feed extend[theUSet: the_unit(intstream(0, 2 * .no) collectintset, create_instant( 10 * .no, 10 * .no), create_instant(100 * .no, 100 * .no), FALSE, TRUE)] count
|
|
|
|
Operator : generateboids
|
|
Number : 1
|
|
Signature: (vector int) x int x (vectore rect) x rect x instant x duration -> stream(tuple((BoidID int)(T instant)(X real)(Y real)))
|
|
Example : query generateboids(create_vector(40, 15, 15), create_vector(1000.0,-3000.0, 20000.0), now(), create_duration(0, 1000000)) count
|
|
Result : 14070
|
|
|
|
|
|
Operator : units
|
|
Number : 1
|
|
Signature: mset -> stream(mset)
|
|
Example : query units( (speed(train7) > 15.0) mbool2mset[7]) count
|
|
Result : 11
|
|
|
|
Operator : val
|
|
Number : 1
|
|
Signature: iset -> intset
|
|
Example : query val(initial( (speed(train7) > 15.0) mbool2mset[7] ))
|
|
Result : (7)
|
|
|
|
Operator : inst
|
|
Number : 1
|
|
Signature: iset -> instant
|
|
Example : query inst(initial( (speed(train7) > 15.0) mbool2mset[7] ))
|
|
Result : 2003-11-20-06:06
|
|
|
|
Operator : initial
|
|
Number : 1
|
|
Signature: iset -> intset
|
|
Example : query val(initial( (speed(train7) > 15.0) mbool2mset[7] ))
|
|
Result : (7)
|
|
|
|
Operator : final
|
|
Number : 1
|
|
Signature: iset -> intset
|
|
Example : query val(final( (speed(train7) > 15.0) mbool2mset[7] ))
|
|
Result : (7)
|
|
|
|
Operator : deftime
|
|
Number : 1
|
|
Signature: mset -> periods, uset->periods
|
|
Example : query deftime((speed(train7) > 15.0) mbool2mset[7] )
|
|
Result : (7)
|
|
|
|
Operator : smooth
|
|
Number : 1
|
|
Signature: mbool x duration -> mbool
|
|
Example : query units(smooth(speed(train7) > 22.0, create_duration(0, 300000))) count
|
|
Result : (6)
|
|
|