public void AddFunctionToContract(ContractDefinition contract, FunctionDefinition funcDef)
        {
            if (!ContractToFunctionsMap.ContainsKey(contract))
            {
                Debug.Assert(!ContractToFuncSigsMap.ContainsKey(contract));
                ContractToFunctionsMap[contract] = new HashSet <FunctionDefinition>();
                ContractToFuncSigsMap[contract]  = new HashSet <string>();
            }

            Debug.Assert(!ContractToFunctionsMap[contract].Contains(funcDef), $"Duplicated function definition: {funcDef.Name}");
            ContractToFunctionsMap[contract].Add(funcDef);

            string signature = TransUtils.ComputeFunctionSignature(funcDef);

            Debug.Assert(!ContractToFuncSigsMap[contract].Contains(signature), $"Duplicated function signature: {signature}");
            ContractToFuncSigsMap[contract].Add(signature);

            Debug.Assert(!FunctionToContractMap.ContainsKey(funcDef), $"Duplicated function: {funcDef.Name}");
            FunctionToContractMap[funcDef] = contract;
        }
 public bool HasFuncSigInContract(ContractDefinition contract, string signature)
 {
     return(ContractToFuncSigsMap.ContainsKey(contract));
 }