Allow functions to calculate dependencies

Change-Id: Ic58f54612d3707abc8727a65a28b9c4502eae31a
Merge "Allow functions to calculate dependencies"