private void GenerateCombiningRequest() { var acrequest = AH.MakeGenericTypeSpecific("ArmadaCombiningRequest", new List <Type> { AH.ReferToType("LPlusState"), AH.ReferToType("L.Armada_TraceEntry"), AH.ReferToType("L.Armada_PC"), AH.ReferToType("HState"), AH.ReferToType("H.Armada_TraceEntry"), AH.ReferToType("H.Armada_PC") }); pgp.MainProof.AddTypeSynonymDecl("ACRequest", acrequest); string str = @" function GetArmadaCombiningRequest() : ACRequest { ArmadaCombiningRequest(LPlus_GetSpecFunctions(), H.Armada_GetSpecFunctions(), GetLPlusHRefinementRelation(), InductiveInv, ConvertTotalState_LPlusH, ConvertTraceEntry_LH, ConvertPC_LH, IsInnerPC) } "; pgp.AddFunction(str); }
//////////////////////////////////////////////////////////////////////// /// Variable-hiding request //////////////////////////////////////////////////////////////////////// private void GenerateVarHidingRequest() { string str; var lplusstate = AH.ReferToType("LPlusState"); var hstate = AH.ReferToType("HState"); var lstep = AH.ReferToType("LStep"); var hstep = AH.ReferToType("HStep"); var vhrequest = AH.MakeGenericTypeSpecific("VarHidingRequest", new List <Type> { lplusstate, hstate, lstep, hstep }); pgp.MainProof.AddTypeSynonymDecl("VHRequest", vhrequest); if (suppressedPCs.Count > 0) { str = @" predicate IsSuppressedPC(pc:L.Armada_PC) { "; str += string.Join(" || ", suppressedPCs.Select(s => $"pc.{s}?")); str += "\n}\n"; } else { str = @" predicate IsSuppressedPC(pc:L.Armada_PC) { false } "; } pgp.AddPredicate(str); str = @" function GetVarHidingRequest() : VHRequest { VarHidingRequest(GetLPlusSpec(), GetHSpec(), GetLPlusHRefinementRelation(), InductiveInv, ConvertTotalState_LPlusH, ConvertAndSuppressMultistep) } "; pgp.AddFunction(str); }
private void GenerateWeakeningRequest() { var lplusstate = AH.ReferToType("LPlusState"); var hstate = AH.ReferToType("HState"); var lstep = AH.ReferToType("LStep"); var hstep = AH.ReferToType("HStep"); var wrequest = AH.MakeGenericTypeSpecific("WeakeningRequest", new List <Type> { lplusstate, hstate, lstep, hstep }); pgp.MainProof.AddTypeSynonymDecl("WRequest", wrequest); var str = @" function GetWeakeningRequest(): WRequest { WeakeningRequest(GetLPlusSpec(), GetHSpec(), GetLPlusHRefinementRelation(), iset lps : LPlusState | InductiveInv(lps) :: lps, ConvertTotalState_LPlusH, ConvertMultistep_LH) } "; pgp.AddFunction(str); }