public function analyze()
{
$isNotRead = 'where( repeat( out() ).emit( hasLabel("Variable").filter{ it.get().value("code") == varname; }).times(' . self::MAX_LOOPING . ')
.where( __.in("ANALYZED").has("analyzer", "Variables/IsRead").count().is(eq(1)) )
.count().is(eq(0)) )';
$isNotUsed = 'where( repeat( out() ).emit( hasLabel("Variable").filter{ it.get().value("code") == varname; } ).times(' . self::MAX_LOOPING . ').count().is(eq(0)) )';
// .where( __.in("ANALYZED").has("analyzer", within("Analyzer\\\\Variables\\\\IsRead", "Analyzer\\\\Variables\\\\IsModified")).count().is(eq(1)) )
// Arguments, not reference
$this->analyzerIs('Variables/Arguments')->savePropertyAs('code', 'varname')->isNot('reference', true)->inIs('ARGUMENT')->inIs('ARGUMENTS')->atomIs('Function')->hasNoOut('ABSTRACT')->hasNoInterface()->outIs('BLOCK')->raw($isNotRead)->back('first');
$this->prepareQuery();
// Arguments, reference
$this->analyzerIs('Variables/Arguments')->savePropertyAs('code', 'varname')->is('reference', true)->inIs('ARGUMENT')->inIs('ARGUMENTS')->atomIs('Function')->hasNoInterface()->hasNoOut('ABSTRACT')->outIs('BLOCK')->raw($isNotUsed)->back('first');
$this->prepareQuery();
// Arguments in a USE, not a reference
$this->atomIs('Function')->hasChildren('Void', 'NAME')->outIs('USE')->outIs('ARGUMENT')->is('reference', false)->savePropertyAs('code', 'varname')->_as('results')->back('first')->outIs('BLOCK')->raw($isNotRead)->back('results');
$this->prepareQuery();
// Arguments in a USE, reference
// Arguments in a USE, not a reference
$this->atomIs('Function')->hasChildren('Void', 'NAME')->outIs('USE')->outIs('ARGUMENT')->is('reference', true)->savePropertyAs('code', 'varname')->_as('results')->back('first')->outIs('BLOCK')->raw($isNotUsed)->back('results');
$this->prepareQuery();
}