public static TypeIsa BoogieFuncInterpType(TypeIsa absValType) { return(new ArrowType(IsaCommonTypes.GetListType(BoogieType()), new ArrowType(IsaCommonTypes.GetListType(ValType(absValType)), IsaCommonTypes.GetOptionType(ValType(absValType))) )); }
public static TypeIsa GetDataTypeSingle(string name, TypeIsa arg) { var list = new List <TypeIsa> { arg }; return(new DataType(name, list)); }
public static Term Let(Identifier boundVar, TypeIsa boundVarType, Term termSubst, Term body) { return(new TermApp( new TermApp(new TermIdent(new SimpleIdentifier("Let")), termSubst), TermQuantifier.Lambda(new List <Identifier> { boundVar }, new List <TypeIsa> { boundVarType }, body) )); }
private int HandleAbbrevOrDef(OuterDecl d, string topLevel, TypeIsa type, string equality, Tuple <IList <Term>, Term> equation) { _sb.Append(topLevel + " ").Append(d.Name); if (type != null) { _sb.Append(" :: "); AppendInner(_typeIsaPrinter.Visit(type)); } _sb.AppendLine().Append(IsaPrettyPrinterHelper.Indent(1)).Append("where"); _sb.AppendLine().Append(IsaPrettyPrinterHelper.Indent(2)); var args = _termPrinter.VisitList(equation.Item1).SpaceAggregate(); AppendInner( () => _sb.Append(d.Name).Append(" ").Append(args).Append(" " + equality + " ") .Append(_termPrinter.Visit(equation.Item2)) ); return(0); }
//returns PureTyIsaTransformer that instantiates U and T with the concrete instantiations public static PureTyIsaTransformer ConretePureTyIsaTransformer(TypeIsa abstractValueType) { //instantiate type in VC representing Boogie values with Boogie value type //instantiate type in VC representing Boogie types with Boogie closed type return(new PureTyIsaTransformer(IsaBoogieType.ValType(abstractValueType), IsaBoogieVC.BoogieClosedType())); }
public static TypeIsa StateType(TypeIsa absValType) { return(IsaCommonTypes.GetDataTypeSingle("state", absValType)); }
public static TypeIsa NormalStateType(TypeIsa absValType) { return(new DataType("nstate", new List <TypeIsa> { absValType })); }
public static TypeIsa AbstractValueTyFunType(TypeIsa absValType) { return(new DataType("absval_ty_fun", new List <TypeIsa> { absValType })); }
public static TypeIsa ValType(TypeIsa absValType) { return(new DataType("val", new List <TypeIsa> { absValType })); }
public static TypeIsa FunInterpType(TypeIsa absValType) { return(new DataType("fun_interp", new List <TypeIsa> { absValType })); }
public static TypeIsa GetListType(TypeIsa elemType) { return(GetDataTypeSingle("list", elemType)); }
public static TypeIsa GetSetType(TypeIsa elemType) { return(GetDataTypeSingle("set", elemType)); }
public static TypeIsa GetOptionType(TypeIsa elemType) { return(GetDataTypeSingle("option", elemType)); }