<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!--
%QUERY%:		The original query before applying the rule without question mark, if the original query ends with a question mark
%FILE_i%:		File number i (i in [1, n]) from the original query
%FEATURE_i%:	Feature number i (i in [1, n]) from the original query
%FEATURES%:		All features from the original query
-->

<rules>
	<rule name="InterAppRule">
		<priority>1</priority>
		<inputQuery>Flows FROM App(%FILE_1%) TO App(%FILE_2%) *3*</inputQuery>
		<outputQuery>
			CONNECT [
				Flows IN App(%FILE_1%) *3*,
				Flows IN App(%FILE_2%) *3*,
				UNIFY [
					IntentSinks IN App(%FILE_1%) *3*,
					CONNECT [
						IntentFilters IN App(%FILE_2%) *3*,
						IntentSources IN App(%FILE_2%) *3*
					] ?
				] ?
			] ?
		</outputQuery>
	</rule>
</rules>