#  Licensed to the Apache Software Foundation (ASF) under one or more
#  contributor license agreements.  See the NOTICE file distributed with
#  this work for additional information regarding copyright ownership.
#  The ASF licenses this file to You under the Apache License, Version 2.0
#  (the "License"); you may not use this file except in compliance with
#  the License.  You may obtain a copy of the License at
# 
#       http://www.apache.org/licenses/LICENSE-2.0
# 
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:	<http://www.w3.org/2000/01/rdf-schema#> .
@prefix mf:     <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix mfx:    <http://jena.hpl.hp.com/2005/05/test-manifest-extra#> .
@prefix qt:     <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .

<>  rdf:type mf:Manifest ;
    rdfs:label "Algebra optimizations" ;
    mf:entries
    ( 
      [  mf:name    "opt-equals-01" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-01.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-01.srx>
      ]
      [  mf:name    "opt-equals-02" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-02.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-02.srx>
      ]
      [  mf:name    "opt-equals-03" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-03.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-03.srx>
      ]
      [  mf:name    "opt-equals-04" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-04.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-04.srx>
      ]
      [  mf:name    "opt-equals-05" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-05.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-05.srx>
      ]
      [  mf:name    "opt-equals-06" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-06.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-06.srx>
      ]
      [  mf:name    "opt-equals-07" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-07.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-07.srx>
      ]
      [  mf:name    "opt-equals-08" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-08.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-08.srx>
      ]
      [  mf:name    "opt-equals-09" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-09.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-09.srx>
      ]
      [  mf:name    "opt-equals-10" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-equals-10.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-equals-10.srx>
      ]

    ## Assumes strict (no value equality) evaluation.
      [  mf:name    "opt-sameTerm-01" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-01.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-01.srx>
      ]
      [  mf:name    "opt-sameTerm-02" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-02.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-02.srx>
      ]
      [  mf:name    "opt-sameTerm-03" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-03.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-03.srx>
      ]
      [  mf:name    "opt-sameTerm-04" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-04.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-04.srx>
      ]
      [  mf:name    "opt-sameTerm-05" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-05.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-05.srx>
      ]
      [  mf:name    "opt-sameTerm-06" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-06.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-06.srx>
      ]
      [  mf:name    "opt-sameTerm-07" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-07.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-07.srx>
      ]
      [  mf:name    "opt-sameTerm-08" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-08.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-08.srx>
      ]
      [  mf:name    "opt-sameTerm-09" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-09.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-09.srx>
      ]
      [  mf:name    "opt-sameTerm-10" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-sameTerm-10.rq> ;
              qt:data   <data-1.ttl> ] ;
        mf:result  <opt-sameTerm-10.srx>
      ]

      [  mf:name    "opt-top-01" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-01.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-01.srj>
      ]

      [  mf:name    "opt-top-02" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-02.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-02.srj>
      ]

      [  mf:name    "opt-top-03" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-03.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-03.srj>
      ]

      [  mf:name    "opt-top-04" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-04.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-04.srj>
      ]

     [  mf:name    "opt-top-05" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-05.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-05.srj>
      ]

      [  mf:name    "opt-top-06" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-06.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-06.srj>
      ]

      [  mf:name    "opt-top-07" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-07.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-07.srj>
      ]

      [  mf:name    "opt-top-08" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-08.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-08.srj>
      ]

      [  mf:name    "opt-top-09" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-09.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-09.srj>
      ]

      [  mf:name    "opt-top-10" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-10.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-10.srj>
      ]

      [  mf:name    "opt-top-11" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-11.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-11.srj>
      ]

      [  mf:name    "opt-top-12" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-12.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-12.srj>
      ]

      [  mf:name    "opt-top-13" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-top-13.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-top-13.srj>
      ]

      [  mf:name    "opt-distinct-to-reduced-01" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-distinct-to-reduced-01.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-distinct-to-reduced-01.srj>
      ]

      [  mf:name    "opt-distinct-to-reduced-02" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-distinct-to-reduced-02.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-distinct-to-reduced-02.srj>
      ]

      [  mf:name    "opt-distinct-to-reduced-03" ;
         rdf:type   mfx:TestQuery ; 
         mf:action
            [ qt:query  <opt-distinct-to-reduced-03.rq> ;
              qt:data   <data-2.ttl> ] ;
        mf:result  <opt-distinct-to-reduced-03.srj>
      ]

    ).
