@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://example.com/>.

:taskA a :CompositeTask ;
    :subtask :taskA1 ;
    :subtask :taskA2 .
:taskA1 a :Completed .
:taskA2 a :Completed .

{ ?task a :CompositeTask . 
  ({ ?task :subtask ?subtask } { ?subtask a :Completed }) log:forAllIn ?SCOPE . 

} => { ?task a :Completed } .
