public override IEnumerable <ProofState> Generate(Statement statement, ProofState state) { Contract.Requires(statement != null); Contract.Requires(state != null); yield break; }
public override IEnumerable <object> Generate(Expression expression, ProofState proofState) { Contract.Requires(expression != null); Contract.Requires(proofState != null); yield break; }
public override Expression Generate(Expression expr, ProofState proofState) { if (expr is ExprDotName) { //ApplySurffix and E0 lhs is NameSegment and string is a function var src = Expr.SimpExpr.SimpTacticExpr(proofState, (expr as ExprDotName).Lhs); if (src is ApplySuffix) { var aps = src as ApplySuffix; if (aps.Lhs is NameSegment && proofState.Members.ContainsKey((aps.Lhs as NameSegment).Name) && proofState.Members[(aps.Lhs as NameSegment).Name] is Function) { return(InstVar.UnfoldFunction(src as ApplySuffix, proofState)); } } proofState.ReportTacticError(expr.tok, "Expression can not be unfolded."); return(null); } else { proofState.ReportTacticError(expr.tok, "Illform for \"unfold\", expect form in the shape of *.unfold"); return(null); } }
public IEnumerable <ProofState> EvalNext(Statement statement, ProofState state0) { Contract.Requires(statement != null); Contract.Requires(statement is TacnyCasesBlockStmt); var state = state0.Copy(); var stmt = statement as TacnyCasesBlockStmt; var raw = state.GetGeneratedaRawCode(); state.AddNewFrame(stmt.Body.Body, IsPartial); var matchStmt = raw[0][0] as MatchStmt; var idx = GetNthCaseIdx(raw); foreach (var tmp in matchStmt.Cases[idx].CasePatterns) { state.AddDafnyVar(tmp.Var.Name, new ProofState.VariableData { Variable = tmp.Var, Type = tmp.Var.Type }); } //with this flag set to true, dafny will check the case branch before evaluates any tacny code state.IfVerify = true; yield return(state); }
internal List <Expression> GetArgs(Expression expr, ProofState state) { if (expr is UnaryOpExpr) { var uExpr = expr as UnaryExpr; return(new List <Expression>() { uExpr.E }); } else if (expr is BinaryExpr) { var binExpr = expr as BinaryExpr; var ret = new List <Expression>(); ret.Add(binExpr.E0); ret.Add(binExpr.E1); return(ret); } else if (expr is TernaryExpr) { var tExpr = expr as TernaryExpr; var ret = new List <Expression>(); ret.Add(tExpr.E0); ret.Add(tExpr.E1); ret.Add(tExpr.E2); return(ret); } state.ReportTacticError(expr.tok, "Can not get the args: unsupported operator."); return(null); }
public override bool MatchStmt(Statement statement, ProofState state) { Contract.Assume(statement != null); var stmt = statement as IfStmt; if (stmt != null) { var ifstmt = stmt; if (ifstmt.Guard == null) { return(true); } else { return(false); } } var alternativeStmt = statement as AlternativeStmt; if (alternativeStmt != null) { var ifstmt = alternativeStmt; // todo: should we allow just a single wildcard (*) or require that all are as we do now? foreach (GuardedAlternative a in ifstmt.Alternatives) { if (!(a.Guard is WildcardExpr)) { return(false); } } return(true); } return(false); }
private IEnumerable <ProofState> StmtHandler(List <Statement> stmts, ProofState state) { IEnumerable <ProofState> enumerable = null; ProofState ret = state; foreach (var stmt in stmts) { if (stmt is TacticVarDeclStmt) { enumerable = Interpreter.RegisterVariable(stmt as TacticVarDeclStmt, ret); var e = enumerable.GetEnumerator(); e.MoveNext(); ret = e.Current; } else if (stmt is PredicateStmt) { enumerable = Interpreter.EvalPredicateStmt((PredicateStmt)stmt, ret); var e = enumerable.GetEnumerator(); e.MoveNext(); ret = e.Current; } } foreach (var item in enumerable) { yield return(item.Copy()); } }
public static Expression UnfoldTacticProjection(ProofState state, Expression expr) { var e = new SimpExpr(state); if (e.IsTVar(expr)) { return(e.EvalTVar(expr, true)); } else { var suffix = expr as ApplySuffix; if (suffix != null) { var aps = suffix; if (e.IsEAtmoicCall(aps)) { return(e.EvalEAtomExpr(aps)); } else if (e.IsETacticCall(aps)) { throw new NotImplementedException(); } } } //TODO: evaluate expr as boolean and return as BooleanRet return(null); }
public override bool EvalTerminated(bool childFrameRes, ProofState state) { var tryEval = EvalExpr.EvalTacticExpression(state, _guard); var literalExpr = tryEval as LiteralExpr; return(literalExpr != null && (bool)literalExpr.Value); }
public static Statement UnfoldTacticExprInStmt(ProofState ps, Statement stmt, ApplySuffix aps, Expression code) { var unfolder = new TacticAppUnfolder(ps, aps, code); return(unfolder.CloneStmt(stmt)); }
public static Expression SimpTacticExpr(ProofState state, Expression expr) { var simplifier = new SimpExpr(state); var ret = simplifier.CloneExpr(expr); return(ret); }
public static ApplySuffix GetTacticAppExpr(ProofState ps, Statement stmt) { var finder = new TacticAppExprFinder(ps); finder.CloneStmt(stmt); return(finder._aps); }
public static ApplySuffix GetTacticAppExpr(ProofState ps, Expression expr) { var finder = new TacticAppExprFinder(ps); finder.CloneExpr(expr); return(finder._aps); }
public static Expression UnfoldFunction(ApplySuffix aps, ProofState ps) { if (aps.Lhs is NameSegment && ps.Members.ContainsKey((aps.Lhs as NameSegment).Name) && ps.Members[(aps.Lhs as NameSegment).Name] is Function) { var src = ps.Members[(aps.Lhs as NameSegment).Name] as Function; if (src.Formals.Count == aps.Args.Count) { //for the case when there is no arguemnt, just return a cloned body of the function if (src.Formals.Count == 0) { return(new Cloner().CloneExpr(src.Body)); } //for the cases with arguemnts. add arg to the dic var inster = new InstVar(); for (var i = 0; i < src.Formals.Count; i++) { inster._inst.Add(src.Formals[i].Name, aps.Args[i]); } return(inster.CloneExpr(src.Body)); } } ps.ReportTacticError(aps.tok, Printer.ExprToString(aps) + " can not be unfolded."); return(new Cloner().CloneExpr(aps)); }
public static bool IsFlowControlFrame(ProofState state) { var typ = state.GetCurFrameTyp(); //more control frame should be added here return(typ == "tmatch"); }
public override IEnumerable <ProofState> EvalStep(ProofState state0) { var tryEval = EvalExpr.EvalTacticExpression(state0, _guard); if (tryEval == null) { yield break; } var state = state0.Copy(); var literalExpr = tryEval as LiteralExpr; if (literalExpr != null && (bool)literalExpr.Value) { //insert the body frame var bodyFrame = new DefaultTacticFrameCtrl(); bodyFrame.InitBasicFrameCtrl(_body, state.IsCurFramePartial(), null, VerifyN); state.AddNewFrame(bodyFrame); } else { state.NeedVerify = true; } yield return(state); }
public override IEnumerable <ProofState> EvalStep(ProofState state0) { var state = state0.Copy(); var stmt = GetStmt() as TacticCasesBlockStmt; var framectrl = new DefaultTacticFrameCtrl(); if (stmt != null) { framectrl.InitBasicFrameCtrl(stmt.Body.Body, state0.IsCurFramePartial(), null, VerifyN); } state.AddNewFrame(framectrl); var idx = GetNthCaseIdx(RawCodeList); if (_matchStmt != null) { foreach (var tmp in _matchStmt.Cases[idx].CasePatterns) { state.AddDafnyVar(tmp.Var.Name, new ProofState.VariableData { Variable = tmp.Var, Type = tmp.Var.Type }); } } //with this flag set to true, dafny will check the case branch before evaluates any tacny code state.NeedVerify = true; yield return(state); }
public override bool EvalTerminated(bool childFrameRes, ProofState ps) { //_matchStmt is the match case stmt with assume false for each case //raw the actual code to be inserted in the case statement return(_matchStmt != null && _matchStmt.Cases.Count == RawCodeList.Count); }
// parameters can be checked by combine the type Formal and the InParam attribute private static bool IsParam(ProofState.VariableData var) { if(var.Variable is Microsoft.Dafny.Formal) { var v = var.Variable as Microsoft.Dafny.Formal; return v.InParam; } else return false; }
public override bool MatchStmt(Statement stmt, ProofState state) { if (stmt is Dafny.IfStmt || stmt is Dafny.AlternativeStmt) { return(new OrChoiceStmt().MatchStmt(stmt, state) == false); } return(false); }
public override IEnumerable <ProofState> Generate(Statement statement, ProofState state) { var tvds = statement as TacticVarDeclStmt; AssignSuchThatStmt suchThat = null; if (tvds != null) { suchThat = tvds.Update as AssignSuchThatStmt; } else if (statement is AssignSuchThatStmt) { suchThat = (AssignSuchThatStmt)statement; } else { Contract.Assert(false, "Unexpected statement type"); } Contract.Assert(suchThat != null, "Unexpected statement type"); BinaryExpr bexp = suchThat.Expr as BinaryExpr; var locals = new List <string>(); if (tvds == null) { foreach (var item in suchThat.Lhss) { if (item is IdentifierExpr) { var id = (IdentifierExpr)item; if (state.ContainTacnyVal(id.Name)) { locals.Add(id.Name); } else { //TODO: error } } } } else { locals = new List <string>(tvds.Locals.Select(x => x.Name).ToList()); } // this will cause issues when multiple variables are used // as the variables are updated one at a time foreach (var local in locals) { foreach (var item in ResolveExpression(state, bexp, local)) { var copy = state.Copy(); copy.UpdateTacnyVar(local, item); yield return(copy); } } }
public virtual IEnumerable <ProofState> EvalStep(ProofState state0) { var statement = GetStmt(); if (statement == null) { return(null); } return(TacnyInterpreter.EvalStmt(statement, state0)); }
public static Expression EvalTacticExpression(ProofState state, Expression expr) { try { var rewriter = new EvalExpr(state); return(rewriter.CloneExpr(expr)); } catch (IllFormedExpr e) { state.ReportTacticError(expr.tok, e.Message); return(null); } }
public override IEnumerable <ProofState> ApplyPatch(ProofState state0) { if (_stmt.Catch != null) { var frame = new DefaultTacticFrameCtrl(); frame.InitBasicFrameCtrl(_stmt.Catch.Body, true, null, VerifyN); _oriState.AddNewFrame(frame); } yield return(_oriState); }
internal static string smethod_5(ProofState A_0) { int num = 9; if (A_0 == ProofState.Clean) { return(BookmarkStart.b("䰮崰嘲吴夶", num)); } return(""); }
/// <summary> /// Project the parameters of the calling method/function /// </summary> /// <param name="expression"></param> /// <param name="proofState"></param> /// <returns></returns> public override Expression Generate(Expression expression, ProofState proofState) { var vars = proofState.GetAllDafnyVars().Values.ToList().Where(IsParam); var ret = new List <Expression>(); foreach (var x in vars) { ret.Add(new TacticLiteralExpr(x.Variable.Name)); } return(GenerateEAtomExprAsSeq(ret)); }
public override IEnumerable <ProofState> EvalStep(ProofState state0) { _pass = true; RawCodeList = new List <List <Statement> >(); GeneratedCode = new List <Statement>(); //inc counter to finish the evaluation of the current fram, note that there is only one statement. // so one is enough IncCounter(); state0.InAsserstion = false; yield return(state0); }
public override Expression Generate(Expression expression, ProofState proofState) { if (proofState.TargetMethod != null) { return(new TacticLiteralExpr(proofState.TargetMethod.Name)); } else { return(null); } }
/// <summary> /// Return the objects of all the lemmas /// </summary> /// <param name="expression"></param> /// <param name="proofState"></param> /// <returns></returns> public override Expression Generate(Expression expression, ProofState proofState) { var ls = proofState.Members.Values.ToList().Where(IsLemma).ToList(); var ret = new List <Expression>(); foreach (var x in ls) { ret.Add(new TacticLiteralExpr(x.Name)); } return(GenerateEAtomExprAsSeq(ret)); }
public override IEnumerable <ProofState> EvalInit(Statement statement, ProofState state0) { var state = state0.Copy(); var blockStmt = statement as Dafny.BlockStmt; if (blockStmt != null) { var frameCtrl = new DefaultTacticFrameCtrl(); frameCtrl.InitBasicFrameCtrl(blockStmt.Body, true, null, VerifyN); state.AddNewFrame(frameCtrl); yield return(state); } }
protected static void InitArgs(ProofState state, Statement st, out List <Expression> callArguments) { Contract.Requires(st != null); Contract.Requires(state != null); callArguments = null; if (st is UpdateStmt) { var us = st as UpdateStmt; callArguments = GetCallArguments(us); } }
private IEnumerable<object> ResolveExpression(ProofState state, Expression expr, string declaration) { Contract.Requires(expr != null); if (expr is BinaryExpr) { BinaryExpr bexp = (BinaryExpr) expr; switch (bexp.Op) { case BinaryExpr.Opcode.In: // Contract.Assert(var != null, Error.MkErr(bexp, 6, declaration.Name)); // Contract.Assert(var.Name == declaration.Name, Error.MkErr(bexp, 6, var.Name)); foreach (var result in Interpreter.EvaluateTacnyExpression(state, bexp.E1)) { if (result is IEnumerable) { foreach (var item in (IEnumerable)result) { yield return item; } } } yield break; case BinaryExpr.Opcode.And: // for each item in the resolved lhs of the expression foreach (var item in ResolveExpression(state, bexp.E0, declaration)) { var copy = state.Copy(); copy.AddLocal(declaration, item); // resolve the rhs expression foreach (var res in Interpreter.EvaluateTacnyExpression(copy, bexp.E1)) { LiteralExpr lit = res as LiteralExpr; // sanity check Contract.Assert(lit != null); if (lit.Value is bool) { // if resolved to true if ((bool)lit.Value) { yield return item; } } } } yield break; } } }
public override IEnumerable<ProofState> Generate(Statement statement, ProofState state) { var tvds = statement as TacticVarDeclStmt; AssignSuchThatStmt suchThat = null; if (tvds != null) suchThat = tvds.Update as AssignSuchThatStmt; else if (statement is AssignSuchThatStmt) { suchThat = (AssignSuchThatStmt)statement; } else { Contract.Assert(false, "Unexpected statement type"); } Contract.Assert(suchThat != null, "Unexpected statement type"); BinaryExpr bexp = suchThat.Expr as BinaryExpr; var locals = new List<string>(); if (tvds == null) { foreach (var item in suchThat.Lhss) { if (item is IdentifierExpr) { var id = (IdentifierExpr)item; if (state.HasLocalValue(id.Name)) locals.Add(id.Name); else { //TODO: error } } } } else { locals = new List<string>(tvds.Locals.Select(x => x.Name).ToList()); } // this will cause issues when multiple variables are used // as the variables are updated one at a time foreach (var local in locals) { foreach (var item in ResolveExpression(state, bexp, local)) { var copy = state.Copy(); copy.UpdateLocal(local, item); yield return copy; } } }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15" } }; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom(){ Percent = "120" }; DoNotDisplayPageBoundaries doNotDisplayPageBoundaries1 = new DoNotDisplayPageBoundaries(); BordersDoNotSurroundHeader bordersDoNotSurroundHeader1 = new BordersDoNotSurroundHeader(); BordersDoNotSurroundFooter bordersDoNotSurroundFooter1 = new BordersDoNotSurroundFooter(); ProofState proofState1 = new ProofState(){ Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop1 = new DefaultTabStop(){ Val = 840 }; DisplayHorizontalDrawingGrid displayHorizontalDrawingGrid1 = new DisplayHorizontalDrawingGrid(){ Val = 0 }; DisplayVerticalDrawingGrid displayVerticalDrawingGrid1 = new DisplayVerticalDrawingGrid(){ Val = 2 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.CompressPunctuation }; Compatibility compatibility1 = new Compatibility(); SpaceForUnderline spaceForUnderline1 = new SpaceForUnderline(); BalanceSingleByteDoubleByteWidth balanceSingleByteDoubleByteWidth1 = new BalanceSingleByteDoubleByteWidth(); DoNotLeaveBackslashAlone doNotLeaveBackslashAlone1 = new DoNotLeaveBackslashAlone(); UnderlineTrailingSpaces underlineTrailingSpaces1 = new UnderlineTrailingSpaces(); DoNotExpandShiftReturn doNotExpandShiftReturn1 = new DoNotExpandShiftReturn(); AdjustLineHeightInTable adjustLineHeightInTable1 = new AdjustLineHeightInTable(); UseFarEastLayout useFarEastLayout1 = new UseFarEastLayout(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting5 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DifferentiateMultirowTableHeaders, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(spaceForUnderline1); compatibility1.Append(balanceSingleByteDoubleByteWidth1); compatibility1.Append(doNotLeaveBackslashAlone1); compatibility1.Append(underlineTrailingSpaces1); compatibility1.Append(doNotExpandShiftReturn1); compatibility1.Append(adjustLineHeightInTable1); compatibility1.Append(useFarEastLayout1); compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); compatibility1.Append(compatibilitySetting5); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot(){ Val = "009423EF" }; Rsid rsid1 = new Rsid(){ Val = "0008591D" }; Rsid rsid2 = new Rsid(){ Val = "000F6BB9" }; Rsid rsid3 = new Rsid(){ Val = "009423EF" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid1); rsids1.Append(rsid2); rsids1.Append(rsid3); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont(){ Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction(){ Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin(){ Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin(){ Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent(){ Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages(){ Val = "en-US", EastAsia = "ja-JP" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults1 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 }; V.TextBox textBox1 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" }; shapeDefaults2.Append(textBox1); Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults1.Append(shapeDefaults2); shapeDefaults1.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol(){ Val = "." }; ListSeparator listSeparator1 = new ListSeparator(){ Val = "," }; W14.DocumentId documentId1 = new W14.DocumentId(){ Val = "5F9C04B8" }; W15.ChartTrackingRefBased chartTrackingRefBased1 = new W15.ChartTrackingRefBased(); W15.PersistentDocumentId persistentDocumentId1 = new W15.PersistentDocumentId(){ Val = "{F93C67B3-65D9-4EFC-B3C8-42982111CA48}" }; settings1.Append(zoom1); settings1.Append(doNotDisplayPageBoundaries1); settings1.Append(bordersDoNotSurroundHeader1); settings1.Append(bordersDoNotSurroundFooter1); settings1.Append(proofState1); settings1.Append(defaultTabStop1); settings1.Append(displayHorizontalDrawingGrid1); settings1.Append(displayVerticalDrawingGrid1); settings1.Append(characterSpacingControl1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults1); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); settings1.Append(documentId1); settings1.Append(chartTrackingRefBased1); settings1.Append(persistentDocumentId1); documentSettingsPart1.Settings = settings1; }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15" } }; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom() { Percent = "120" }; ProofState proofState1 = new ProofState() { Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop1 = new DefaultTabStop() { Val = 720 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl() { Val = CharacterSpacingValues.DoNotCompress }; Compatibility compatibility1 = new Compatibility(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting() { Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting() { Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting() { Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting() { Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting5 = new CompatibilitySetting() { Name = new EnumValue<CompatSettingNameValues>() { InnerText = "differentiateMultirowTableHeaders" }, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); compatibility1.Append(compatibilitySetting5); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot() { Val = "00417926" }; Rsid rsid1 = new Rsid() { Val = "00015C18" }; Rsid rsid2 = new Rsid() { Val = "000730E1" }; Rsid rsid3 = new Rsid() { Val = "00116604" }; Rsid rsid4 = new Rsid() { Val = "001E6F64" }; Rsid rsid5 = new Rsid() { Val = "002928D6" }; Rsid rsid6 = new Rsid() { Val = "002C2DE6" }; Rsid rsid7 = new Rsid() { Val = "003F6835" }; Rsid rsid8 = new Rsid() { Val = "00417926" }; Rsid rsid9 = new Rsid() { Val = "00443ACA" }; Rsid rsid10 = new Rsid() { Val = "00506382" }; Rsid rsid11 = new Rsid() { Val = "00613B48" }; Rsid rsid12 = new Rsid() { Val = "00646179" }; Rsid rsid13 = new Rsid() { Val = "00690638" }; Rsid rsid14 = new Rsid() { Val = "00745A6B" }; Rsid rsid15 = new Rsid() { Val = "007F61F5" }; Rsid rsid16 = new Rsid() { Val = "00882792" }; Rsid rsid17 = new Rsid() { Val = "009035DD" }; Rsid rsid18 = new Rsid() { Val = "00910498" }; Rsid rsid19 = new Rsid() { Val = "009B6C59" }; Rsid rsid20 = new Rsid() { Val = "00AA36A4" }; Rsid rsid21 = new Rsid() { Val = "00B5104A" }; Rsid rsid22 = new Rsid() { Val = "00BD60A1" }; Rsid rsid23 = new Rsid() { Val = "00D62411" }; Rsid rsid24 = new Rsid() { Val = "00EA7D1E" }; Rsid rsid25 = new Rsid() { Val = "00EE18CB" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid1); rsids1.Append(rsid2); rsids1.Append(rsid3); rsids1.Append(rsid4); rsids1.Append(rsid5); rsids1.Append(rsid6); rsids1.Append(rsid7); rsids1.Append(rsid8); rsids1.Append(rsid9); rsids1.Append(rsid10); rsids1.Append(rsid11); rsids1.Append(rsid12); rsids1.Append(rsid13); rsids1.Append(rsid14); rsids1.Append(rsid15); rsids1.Append(rsid16); rsids1.Append(rsid17); rsids1.Append(rsid18); rsids1.Append(rsid19); rsids1.Append(rsid20); rsids1.Append(rsid21); rsids1.Append(rsid22); rsids1.Append(rsid23); rsids1.Append(rsid24); rsids1.Append(rsid25); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont() { Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary() { Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction() { Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction() { Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin() { Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin() { Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification() { Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent() { Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation() { Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation() { Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages() { Val = "en-NZ" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping() { Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults1 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults() { Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 }; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout() { Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap() { Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults1.Append(shapeDefaults2); shapeDefaults1.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol() { Val = "." }; ListSeparator listSeparator1 = new ListSeparator() { Val = "," }; OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<w15:chartTrackingRefBased xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" />"); OpenXmlUnknownElement openXmlUnknownElement2 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<w15:docId w15:val=\"{4EB8CCD5-0ACB-4603-AD4F-B7B3A0D8FABE}\" xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" />"); settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults1); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); settings1.Append(openXmlUnknownElement1); settings1.Append(openXmlUnknownElement2); documentSettingsPart1.Settings = settings1; }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15" } }; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom() { Percent = "100" }; ProofState proofState1 = new ProofState() { Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop1 = new DefaultTabStop() { Val = 720 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl() { Val = CharacterSpacingValues.DoNotCompress }; Compatibility compatibility1 = new Compatibility(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting() { Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting() { Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting() { Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting() { Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting5 = new CompatibilitySetting() { Name = new EnumValue<CompatSettingNameValues>() { InnerText = "differentiateMultirowTableHeaders" }, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); compatibility1.Append(compatibilitySetting5); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot() { Val = "003C5001" }; Rsid rsid1 = new Rsid() { Val = "003C5001" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid1); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont() { Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary() { Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction() { Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction() { Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin() { Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin() { Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification() { Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent() { Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation() { Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation() { Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages() { Val = "en-US" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping() { Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults1 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults() { Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 }; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout() { Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap() { Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults1.Append(shapeDefaults2); shapeDefaults1.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol() { Val = "." }; ListSeparator listSeparator1 = new ListSeparator() { Val = "," }; OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<w15:chartTrackingRefBased xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" />"); OpenXmlUnknownElement openXmlUnknownElement2 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<w15:docId w15:val=\"{FC4B7391-127E-4CED-9B36-31B279F2A7F2}\" xmlns:w15=\"http://schemas.microsoft.com/office/word/2012/wordml\" />"); settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults1); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); settings1.Append(openXmlUnknownElement1); settings1.Append(openXmlUnknownElement2); documentSettingsPart1.Settings = settings1; }
private void InitArgs(ProofState ps, Statement st, out IVariable lv, out List<Expression> callArguments) { Contract.Requires(st != null); Contract.Ensures(Contract.ValueAtReturn(out callArguments) != null); lv = null; callArguments = null; TacticVarDeclStmt tvds; UpdateStmt us; TacnyBlockStmt tbs; // tacny variables should be declared as tvar or tactic var //if(st is VarDeclStmt) // Contract.Assert(false, Error.MkErr(st, 13)); if((tvds = st as TacticVarDeclStmt) != null) { lv = tvds.Locals[0]; callArguments = GetCallArguments(tvds.Update as UpdateStmt); } else if((us = st as UpdateStmt) != null) { if(us.Lhss.Count == 0) callArguments = GetCallArguments(us); else { var ns = (NameSegment)us.Lhss[0]; if(ps.ContainTacnyVal(ns)) { //TODO: need to doubel check this lv = ps.GetTacnyVarValue(ns) as IVariable; callArguments = GetCallArguments(us); } } } else if((tbs = st as TacnyBlockStmt) != null) { var pe = tbs.Guard as ParensExpression; callArguments = pe != null ? new List<Expression> { pe.E } : new List<Expression> { tbs.Guard }; } }
/// <summary> /// Return the objects of all the lemmas /// </summary> /// <param name="expression"></param> /// <param name="proofState"></param> /// <returns></returns> public override IEnumerable<object> Generate(Expression expression, ProofState proofState){ var ls = proofState.Members.Values.ToList().Where(IsLemma); yield return ls.ToList(); }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings(); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom() { Percent = "100" }; ProofState proofState1 = new ProofState() { Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop1 = new DefaultTabStop() { Val = 720 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl() { Val = CharacterSpacingValues.DoNotCompress }; Compatibility compatibility1 = new Compatibility(); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot() { Val = "00E850CC" }; Rsid rsid1 = new Rsid() { Val = "002E76BF" }; Rsid rsid2 = new Rsid() { Val = "00342EC5" }; Rsid rsid3 = new Rsid() { Val = "006E2549" }; Rsid rsid4 = new Rsid() { Val = "007B1630" }; Rsid rsid5 = new Rsid() { Val = "00A539C5" }; Rsid rsid6 = new Rsid() { Val = "00B26A64" }; Rsid rsid7 = new Rsid() { Val = "00E850CC" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid1); rsids1.Append(rsid2); rsids1.Append(rsid3); rsids1.Append(rsid4); rsids1.Append(rsid5); rsids1.Append(rsid6); rsids1.Append(rsid7); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont() { Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary() { Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction() { Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction() { Val = M.BooleanValues.Off }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin() { Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin() { Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification() { Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent() { Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation() { Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation() { Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages() { Val = "en-US" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping() { Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults1 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults() { Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 4098 }; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout() { Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap() { Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults1.Append(shapeDefaults2); shapeDefaults1.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol() { Val = "." }; ListSeparator listSeparator1 = new ListSeparator() { Val = "," }; settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults1); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); documentSettingsPart1.Settings = settings1; }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings() {MCAttributes = new MarkupCompatibilityAttributes() {Ignorable = "w14"}}; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom() {Percent = "100"}; ProofState proofState1 = new ProofState() {Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean}; MailMerge mailMerge1 = new MailMerge(); MainDocumentType mainDocumentType1 = new MainDocumentType() {Val = MailMergeDocumentValues.FormLetter}; DataType dataType1 = new DataType() {Val = MailMergeDataValues.TextFile}; ActiveRecord activeRecord1 = new ActiveRecord() {Val = -1}; mailMerge1.Append(mainDocumentType1); mailMerge1.Append(dataType1); mailMerge1.Append(activeRecord1); DefaultTabStop defaultTabStop1 = new DefaultTabStop() {Val = 720}; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl() {Val = CharacterSpacingValues.DoNotCompress}; HeaderShapeDefaults headerShapeDefaults1 = new HeaderShapeDefaults(); Ovml.ShapeDefaults shapeDefaults1 = new Ovml.ShapeDefaults() {Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 6145}; headerShapeDefaults1.Append(shapeDefaults1); FootnoteDocumentWideProperties footnoteDocumentWideProperties1 = new FootnoteDocumentWideProperties(); FootnoteSpecialReference footnoteSpecialReference1 = new FootnoteSpecialReference() {Id = -1}; FootnoteSpecialReference footnoteSpecialReference2 = new FootnoteSpecialReference() {Id = 0}; footnoteDocumentWideProperties1.Append(footnoteSpecialReference1); footnoteDocumentWideProperties1.Append(footnoteSpecialReference2); EndnoteDocumentWideProperties endnoteDocumentWideProperties1 = new EndnoteDocumentWideProperties(); EndnoteSpecialReference endnoteSpecialReference1 = new EndnoteSpecialReference() {Id = -1}; EndnoteSpecialReference endnoteSpecialReference2 = new EndnoteSpecialReference() {Id = 0}; endnoteDocumentWideProperties1.Append(endnoteSpecialReference1); endnoteDocumentWideProperties1.Append(endnoteSpecialReference2); Compatibility compatibility1 = new Compatibility(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting() { Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "14" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting() { Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting() { Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting() { Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot() {Val = "002307CA"}; Rsid rsid25 = new Rsid() {Val = "00021925"}; Rsid rsid26 = new Rsid() {Val = "0005059E"}; Rsid rsid27 = new Rsid() {Val = "002307CA"}; Rsid rsid28 = new Rsid() {Val = "00267818"}; Rsid rsid29 = new Rsid() {Val = "002E2CE3"}; Rsid rsid30 = new Rsid() {Val = "00367B71"}; Rsid rsid31 = new Rsid() {Val = "003C716F"}; Rsid rsid32 = new Rsid() {Val = "00442AD3"}; Rsid rsid33 = new Rsid() {Val = "00485B24"}; Rsid rsid34 = new Rsid() {Val = "004B0395"}; Rsid rsid35 = new Rsid() {Val = "005A7CCB"}; Rsid rsid36 = new Rsid() {Val = "00664E23"}; Rsid rsid37 = new Rsid() {Val = "006D0F9D"}; Rsid rsid38 = new Rsid() {Val = "006F12E1"}; Rsid rsid39 = new Rsid() {Val = "00731A43"}; Rsid rsid40 = new Rsid() {Val = "00736D14"}; Rsid rsid41 = new Rsid() {Val = "007977E5"}; Rsid rsid42 = new Rsid() {Val = "007B10F8"}; Rsid rsid43 = new Rsid() {Val = "007C67E7"}; Rsid rsid44 = new Rsid() {Val = "00960953"}; Rsid rsid45 = new Rsid() {Val = "009F02C7"}; Rsid rsid46 = new Rsid() {Val = "00A056C7"}; Rsid rsid47 = new Rsid() {Val = "00B32099"}; Rsid rsid48 = new Rsid() {Val = "00B92CF0"}; Rsid rsid49 = new Rsid() {Val = "00BC57A3"}; Rsid rsid50 = new Rsid() {Val = "00BE6B68"}; Rsid rsid51 = new Rsid() {Val = "00BF235B"}; Rsid rsid52 = new Rsid() {Val = "00BF5126"}; Rsid rsid53 = new Rsid() {Val = "00C91302"}; Rsid rsid54 = new Rsid() {Val = "00CA68EB"}; Rsid rsid55 = new Rsid() {Val = "00E33AA1"}; Rsid rsid56 = new Rsid() {Val = "00E40D36"}; Rsid rsid57 = new Rsid() {Val = "00E7460D"}; Rsid rsid58 = new Rsid() {Val = "00E95156"}; Rsid rsid59 = new Rsid() {Val = "00F06304"}; Rsid rsid60 = new Rsid() {Val = "00FA5EBC"}; Rsid rsid61 = new Rsid() {Val = "00FB1F22"}; rsids1.Append(rsidRoot1); rsids1.Append(rsid25); rsids1.Append(rsid26); rsids1.Append(rsid27); rsids1.Append(rsid28); rsids1.Append(rsid29); rsids1.Append(rsid30); rsids1.Append(rsid31); rsids1.Append(rsid32); rsids1.Append(rsid33); rsids1.Append(rsid34); rsids1.Append(rsid35); rsids1.Append(rsid36); rsids1.Append(rsid37); rsids1.Append(rsid38); rsids1.Append(rsid39); rsids1.Append(rsid40); rsids1.Append(rsid41); rsids1.Append(rsid42); rsids1.Append(rsid43); rsids1.Append(rsid44); rsids1.Append(rsid45); rsids1.Append(rsid46); rsids1.Append(rsid47); rsids1.Append(rsid48); rsids1.Append(rsid49); rsids1.Append(rsid50); rsids1.Append(rsid51); rsids1.Append(rsid52); rsids1.Append(rsid53); rsids1.Append(rsid54); rsids1.Append(rsid55); rsids1.Append(rsid56); rsids1.Append(rsid57); rsids1.Append(rsid58); rsids1.Append(rsid59); rsids1.Append(rsid60); rsids1.Append(rsid61); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont() {Val = "Cambria Math"}; M.BreakBinary breakBinary1 = new M.BreakBinary() {Val = M.BreakBinaryOperatorValues.Before}; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction() {Val = M.BreakBinarySubtractionValues.MinusMinus}; M.SmallFraction smallFraction1 = new M.SmallFraction() {Val = M.BooleanValues.Zero}; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin() {Val = (UInt32Value) 0U}; M.RightMargin rightMargin1 = new M.RightMargin() {Val = (UInt32Value) 0U}; M.DefaultJustification defaultJustification1 = new M.DefaultJustification() {Val = M.JustificationValues.CenterGroup}; M.WrapIndent wrapIndent1 = new M.WrapIndent() {Val = (UInt32Value) 1440U}; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation() {Val = M.LimitLocationValues.SubscriptSuperscript}; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation() {Val = M.LimitLocationValues.UnderOver}; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages() {Val = "en-US"}; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping() { Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults2 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults3 = new Ovml.ShapeDefaults() {Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 6145}; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout() {Extension = V.ExtensionHandlingBehaviorValues.Edit}; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap() {Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1"}; shapeLayout1.Append(shapeIdMap1); shapeDefaults2.Append(shapeDefaults3); shapeDefaults2.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol() {Val = "."}; ListSeparator listSeparator1 = new ListSeparator() {Val = ","}; settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(mailMerge1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(headerShapeDefaults1); settings1.Append(footnoteDocumentWideProperties1); settings1.Append(endnoteDocumentWideProperties1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults2); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); documentSettingsPart1.Settings = settings1; }
/// <summary> /// </summary> /// <param name="statement"></param> /// <param name="state"></param> /// <returns></returns> public abstract IEnumerable<ProofState> Generate(Statement statement, ProofState state);
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14" } }; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom(){ Percent = "130" }; ProofState proofState1 = new ProofState(){ Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; AttachedTemplate attachedTemplate1 = new AttachedTemplate(){ Id = "rId1" }; DefaultTabStop defaultTabStop1 = new DefaultTabStop(){ Val = 720 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.DoNotCompress }; Compatibility compatibility1 = new Compatibility(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "14" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot(){ Val = "00F00514" }; Rsid rsid13 = new Rsid(){ Val = "0013421C" }; Rsid rsid14 = new Rsid(){ Val = "00185682" }; Rsid rsid15 = new Rsid(){ Val = "001E7601" }; Rsid rsid16 = new Rsid(){ Val = "00227AB2" }; Rsid rsid17 = new Rsid(){ Val = "0028497E" }; Rsid rsid18 = new Rsid(){ Val = "002A4705" }; Rsid rsid19 = new Rsid(){ Val = "00354CB4" }; Rsid rsid20 = new Rsid(){ Val = "003C2296" }; Rsid rsid21 = new Rsid(){ Val = "004140B7" }; Rsid rsid22 = new Rsid(){ Val = "006217A5" }; Rsid rsid23 = new Rsid(){ Val = "00672B88" }; Rsid rsid24 = new Rsid(){ Val = "006E6D18" }; Rsid rsid25 = new Rsid(){ Val = "00734DD4" }; Rsid rsid26 = new Rsid(){ Val = "0083080C" }; Rsid rsid27 = new Rsid(){ Val = "0088581B" }; Rsid rsid28 = new Rsid(){ Val = "00A1337C" }; Rsid rsid29 = new Rsid(){ Val = "00A213D6" }; Rsid rsid30 = new Rsid(){ Val = "00AA3180" }; Rsid rsid31 = new Rsid(){ Val = "00D77907" }; Rsid rsid32 = new Rsid(){ Val = "00E74180" }; Rsid rsid33 = new Rsid(){ Val = "00EF4816" }; Rsid rsid34 = new Rsid(){ Val = "00F00514" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid13); rsids1.Append(rsid14); rsids1.Append(rsid15); rsids1.Append(rsid16); rsids1.Append(rsid17); rsids1.Append(rsid18); rsids1.Append(rsid19); rsids1.Append(rsid20); rsids1.Append(rsid21); rsids1.Append(rsid22); rsids1.Append(rsid23); rsids1.Append(rsid24); rsids1.Append(rsid25); rsids1.Append(rsid26); rsids1.Append(rsid27); rsids1.Append(rsid28); rsids1.Append(rsid29); rsids1.Append(rsid30); rsids1.Append(rsid31); rsids1.Append(rsid32); rsids1.Append(rsid33); rsids1.Append(rsid34); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont(){ Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction(){ Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin(){ Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin(){ Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent(){ Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages(){ Val = "en-US" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults1 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 }; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults1.Append(shapeDefaults2); shapeDefaults1.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol(){ Val = "." }; ListSeparator listSeparator1 = new ListSeparator(){ Val = "," }; settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(attachedTemplate1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults1); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); documentSettingsPart1.Settings = settings1; }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14" } }; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom() { Percent = "100" }; ProofState proofState1 = new ProofState() { Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop1 = new DefaultTabStop() { Val = 708 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl() { Val = CharacterSpacingValues.DoNotCompress }; FootnoteDocumentWideProperties footnoteDocumentWideProperties1 = new FootnoteDocumentWideProperties(); FootnoteSpecialReference footnoteSpecialReference1 = new FootnoteSpecialReference() { Id = -1 }; FootnoteSpecialReference footnoteSpecialReference2 = new FootnoteSpecialReference() { Id = 0 }; footnoteDocumentWideProperties1.Append(footnoteSpecialReference1); footnoteDocumentWideProperties1.Append(footnoteSpecialReference2); EndnoteDocumentWideProperties endnoteDocumentWideProperties1 = new EndnoteDocumentWideProperties(); EndnoteSpecialReference endnoteSpecialReference1 = new EndnoteSpecialReference() { Id = -1 }; EndnoteSpecialReference endnoteSpecialReference2 = new EndnoteSpecialReference() { Id = 0 }; endnoteDocumentWideProperties1.Append(endnoteSpecialReference1); endnoteDocumentWideProperties1.Append(endnoteSpecialReference2); Compatibility compatibility1 = new Compatibility(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting() { Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "14" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting() { Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting() { Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting() { Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot() { Val = "00945FC6" }; Rsid rsid1 = new Rsid() { Val = "00391036" }; Rsid rsid2 = new Rsid() { Val = "00571FC0" }; Rsid rsid3 = new Rsid() { Val = "00900A10" }; Rsid rsid4 = new Rsid() { Val = "00945FC6" }; Rsid rsid5 = new Rsid() { Val = "00D60978" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid1); rsids1.Append(rsid2); rsids1.Append(rsid3); rsids1.Append(rsid4); rsids1.Append(rsid5); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont() { Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary() { Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction() { Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction() { Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin() { Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin() { Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification() { Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent() { Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation() { Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation() { Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages() { Val = "ru-RU" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping() { Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults1 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults() { Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 }; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout() { Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap() { Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults1.Append(shapeDefaults2); shapeDefaults1.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol() { Val = "," }; ListSeparator listSeparator1 = new ListSeparator() { Val = ";" }; settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(footnoteDocumentWideProperties1); settings1.Append(endnoteDocumentWideProperties1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults1); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); documentSettingsPart1.Settings = settings1; }
public override IEnumerable<ProofState> Generate(Statement statement, ProofState state) { List<List<IVariable>> args = new List<List<IVariable>>(); List<IVariable> mdIns = new List<IVariable>(); List<Expression> callArguments; IVariable lv; InitArgs(state, statement, out lv, out callArguments); state.IfVerify = true; //TODO: implement this properly //var members = state.GetLocalValue(callArguments[0] as NameSegment) as IEnumerable<MemberDecl>; //evaluate the argument (methods/lemma) var members0 = Interpreter.EvalTacnyExpression(state, callArguments[0]).GetEnumerator(); members0.MoveNext(); var members = members0.Current as List<MemberDecl>; if (members == null){ yield break; } foreach(var member in members) { MemberDecl md; mdIns.Clear(); args.Clear(); if(member is NameSegment) { //TODO: Console.WriteLine("double check this"); md = null; // md = state.GetDafnyProgram(). Members.FirstOrDefault(i => i.Key == (member as NameSegment)?.Name).Value; } else { md = member as MemberDecl; } // take the membed decl parameters var method = md as Method; if(method != null) mdIns.AddRange(method.Ins); else if(md is Microsoft.Dafny.Function) mdIns.AddRange(((Microsoft.Dafny.Function)md).Formals); else Contract.Assert(false, "In Explore Atomic call," + callArguments[0] + "is neither a Method or a Function"); //evaluate the arguemnts for the lemma to be called var instArgs = Interpreter.EvalTacnyExpression(state, callArguments[1]); foreach(var ovars in instArgs) { Contract.Assert(ovars != null, "In Explore Atomic call," + callArguments[1] + "is not variable"); List<IVariable> vars = ovars as List<IVariable> ?? new List<IVariable>(); //Contract.Assert(vars != null, Util.Error.MkErr(call_arguments[0], 1, typeof(List<IVariable>))); //for the case when no args, just add an empty list if (mdIns.Count == 0){ args.Add(new List<IVariable>()); } for(int i = 0; i < mdIns.Count; i++) { var item = mdIns[i]; args.Add(new List<IVariable>()); foreach(var arg in vars) { // get variable type Type type = state.GetDafnyVarType(arg.Name); if(type != null) { if(type is UserDefinedType && item.Type is UserDefinedType) { var udt1 = type as UserDefinedType; var udt2 = item.Type as UserDefinedType; if(udt1.Name == udt2.Name) args[i].Add(arg); } else { // if variable type and current argument types match, or the type is yet to be inferred if(item.Type.ToString() == type.ToString() || type is InferredTypeProxy) args[i].Add(arg); } } else args[i].Add(arg); } /** * if no type correct variables have been added we can safely return * because we won't be able to generate valid calls */ if(args[i].Count == 0) { Debug.WriteLine("No type matching variables were found"); yield break; } } foreach(var result in PermuteArguments(args, 0, new List<NameSegment>())) { // create new fresh list of items to remove multiple references to the same object List<Expression> newList = result.Cast<Expression>().ToList().Copy(); //TODO: need to double check wirh Vito, why can't use copy ? //Util.Copy.CopyExpressionList(result.Cast<Expression>().ToList()); ApplySuffix aps = new ApplySuffix(callArguments[0].tok, new NameSegment(callArguments[0].tok, md.Name, null), newList); if(lv != null) { var newState = state.Copy(); newState.AddTacnyVar(lv, aps); yield return newState; } else { var newState = state.Copy(); UpdateStmt us = new UpdateStmt(aps.tok, aps.tok, new List<Expression>(), new List<AssignmentRhs> { new ExprRhs(aps) }); //Printer p = new Printer(Console.Out); //p.PrintStatement(us,0); newState.AddStatement(us); yield return newState; } } } } }
public override IEnumerable<ProofState> Generate(Statement statement, ProofState state) { Contract.Requires(statement != null); Contract.Requires(state != null); yield break; }
// Generates content of documentSettingsPart1. private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1) { Settings settings1 = new Settings() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14" } }; settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom() { Percent = "100" }; ProofState proofState1 = new ProofState() { Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop1 = new DefaultTabStop() { Val = 708 }; CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl() { Val = CharacterSpacingValues.DoNotCompress }; HeaderShapeDefaults headerShapeDefaults1 = new HeaderShapeDefaults(); Ovml.ShapeDefaults shapeDefaults1 = new Ovml.ShapeDefaults() { Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 }; headerShapeDefaults1.Append(shapeDefaults1); FootnoteDocumentWideProperties footnoteDocumentWideProperties1 = new FootnoteDocumentWideProperties(); FootnoteSpecialReference footnoteSpecialReference1 = new FootnoteSpecialReference() { Id = -1 }; FootnoteSpecialReference footnoteSpecialReference2 = new FootnoteSpecialReference() { Id = 0 }; footnoteDocumentWideProperties1.Append(footnoteSpecialReference1); footnoteDocumentWideProperties1.Append(footnoteSpecialReference2); EndnoteDocumentWideProperties endnoteDocumentWideProperties1 = new EndnoteDocumentWideProperties(); EndnoteSpecialReference endnoteSpecialReference1 = new EndnoteSpecialReference() { Id = -1 }; EndnoteSpecialReference endnoteSpecialReference2 = new EndnoteSpecialReference() { Id = 0 }; endnoteDocumentWideProperties1.Append(endnoteSpecialReference1); endnoteDocumentWideProperties1.Append(endnoteSpecialReference2); Compatibility compatibility1 = new Compatibility(); CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting() { Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "14" }; CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting() { Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting() { Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting() { Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility1.Append(compatibilitySetting1); compatibility1.Append(compatibilitySetting2); compatibility1.Append(compatibilitySetting3); compatibility1.Append(compatibilitySetting4); Rsids rsids1 = new Rsids(); RsidRoot rsidRoot1 = new RsidRoot() { Val = "00935781" }; Rsid rsid15 = new Rsid() { Val = "00003617" }; Rsid rsid16 = new Rsid() { Val = "00016928" }; Rsid rsid17 = new Rsid() { Val = "000F1AD7" }; Rsid rsid18 = new Rsid() { Val = "001403E6" }; Rsid rsid19 = new Rsid() { Val = "00143DFA" }; Rsid rsid20 = new Rsid() { Val = "001501AF" }; Rsid rsid21 = new Rsid() { Val = "00191D83" }; Rsid rsid22 = new Rsid() { Val = "00192264" }; Rsid rsid23 = new Rsid() { Val = "001937C3" }; Rsid rsid24 = new Rsid() { Val = "001B1FF0" }; Rsid rsid25 = new Rsid() { Val = "00264050" }; Rsid rsid26 = new Rsid() { Val = "00271936" }; Rsid rsid27 = new Rsid() { Val = "002D71C1" }; Rsid rsid28 = new Rsid() { Val = "00322D30" }; Rsid rsid29 = new Rsid() { Val = "003434A0" }; Rsid rsid30 = new Rsid() { Val = "00350EC1" }; Rsid rsid31 = new Rsid() { Val = "003F69B3" }; Rsid rsid32 = new Rsid() { Val = "00412D79" }; Rsid rsid33 = new Rsid() { Val = "0042794A" }; Rsid rsid34 = new Rsid() { Val = "0043338C" }; Rsid rsid35 = new Rsid() { Val = "00433799" }; Rsid rsid36 = new Rsid() { Val = "00497D0C" }; Rsid rsid37 = new Rsid() { Val = "004A2D5D" }; Rsid rsid38 = new Rsid() { Val = "0053093D" }; Rsid rsid39 = new Rsid() { Val = "005C0B9A" }; Rsid rsid40 = new Rsid() { Val = "005E5B29" }; Rsid rsid41 = new Rsid() { Val = "005E7F95" }; Rsid rsid42 = new Rsid() { Val = "00624EAF" }; Rsid rsid43 = new Rsid() { Val = "00633FB5" }; Rsid rsid44 = new Rsid() { Val = "00642B12" }; Rsid rsid45 = new Rsid() { Val = "00683C1F" }; Rsid rsid46 = new Rsid() { Val = "006B4E48" }; Rsid rsid47 = new Rsid() { Val = "007752C6" }; Rsid rsid48 = new Rsid() { Val = "00786E44" }; Rsid rsid49 = new Rsid() { Val = "007A6711" }; Rsid rsid50 = new Rsid() { Val = "0085395D" }; Rsid rsid51 = new Rsid() { Val = "008557B0" }; Rsid rsid52 = new Rsid() { Val = "00885B8E" }; Rsid rsid53 = new Rsid() { Val = "0091439C" }; Rsid rsid54 = new Rsid() { Val = "00935781" }; Rsid rsid55 = new Rsid() { Val = "00980A5B" }; Rsid rsid56 = new Rsid() { Val = "009B5BC8" }; Rsid rsid57 = new Rsid() { Val = "009F4FE3" }; Rsid rsid58 = new Rsid() { Val = "00A151C0" }; Rsid rsid59 = new Rsid() { Val = "00A40C57" }; Rsid rsid60 = new Rsid() { Val = "00A86B82" }; Rsid rsid61 = new Rsid() { Val = "00AD3F57" }; Rsid rsid62 = new Rsid() { Val = "00B34E29" }; Rsid rsid63 = new Rsid() { Val = "00B85FE1" }; Rsid rsid64 = new Rsid() { Val = "00BA0E12" }; Rsid rsid65 = new Rsid() { Val = "00BF41B3" }; Rsid rsid66 = new Rsid() { Val = "00C86F82" }; Rsid rsid67 = new Rsid() { Val = "00CB2215" }; Rsid rsid68 = new Rsid() { Val = "00D209DB" }; Rsid rsid69 = new Rsid() { Val = "00D9517A" }; Rsid rsid70 = new Rsid() { Val = "00E17905" }; Rsid rsid71 = new Rsid() { Val = "00F123A5" }; Rsid rsid72 = new Rsid() { Val = "00F4484B" }; Rsid rsid73 = new Rsid() { Val = "00F91F6D" }; Rsid rsid74 = new Rsid() { Val = "00FE6F13" }; rsids1.Append(rsidRoot1); rsids1.Append(rsid15); rsids1.Append(rsid16); rsids1.Append(rsid17); rsids1.Append(rsid18); rsids1.Append(rsid19); rsids1.Append(rsid20); rsids1.Append(rsid21); rsids1.Append(rsid22); rsids1.Append(rsid23); rsids1.Append(rsid24); rsids1.Append(rsid25); rsids1.Append(rsid26); rsids1.Append(rsid27); rsids1.Append(rsid28); rsids1.Append(rsid29); rsids1.Append(rsid30); rsids1.Append(rsid31); rsids1.Append(rsid32); rsids1.Append(rsid33); rsids1.Append(rsid34); rsids1.Append(rsid35); rsids1.Append(rsid36); rsids1.Append(rsid37); rsids1.Append(rsid38); rsids1.Append(rsid39); rsids1.Append(rsid40); rsids1.Append(rsid41); rsids1.Append(rsid42); rsids1.Append(rsid43); rsids1.Append(rsid44); rsids1.Append(rsid45); rsids1.Append(rsid46); rsids1.Append(rsid47); rsids1.Append(rsid48); rsids1.Append(rsid49); rsids1.Append(rsid50); rsids1.Append(rsid51); rsids1.Append(rsid52); rsids1.Append(rsid53); rsids1.Append(rsid54); rsids1.Append(rsid55); rsids1.Append(rsid56); rsids1.Append(rsid57); rsids1.Append(rsid58); rsids1.Append(rsid59); rsids1.Append(rsid60); rsids1.Append(rsid61); rsids1.Append(rsid62); rsids1.Append(rsid63); rsids1.Append(rsid64); rsids1.Append(rsid65); rsids1.Append(rsid66); rsids1.Append(rsid67); rsids1.Append(rsid68); rsids1.Append(rsid69); rsids1.Append(rsid70); rsids1.Append(rsid71); rsids1.Append(rsid72); rsids1.Append(rsid73); rsids1.Append(rsid74); M.MathProperties mathProperties1 = new M.MathProperties(); M.MathFont mathFont1 = new M.MathFont() { Val = "Cambria Math" }; M.BreakBinary breakBinary1 = new M.BreakBinary() { Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction() { Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction1 = new M.SmallFraction() { Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults(); M.LeftMargin leftMargin1 = new M.LeftMargin() { Val = (UInt32Value)0U }; M.RightMargin rightMargin1 = new M.RightMargin() { Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification1 = new M.DefaultJustification() { Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent1 = new M.WrapIndent() { Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation() { Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation() { Val = M.LimitLocationValues.UnderOver }; mathProperties1.Append(mathFont1); mathProperties1.Append(breakBinary1); mathProperties1.Append(breakBinarySubtraction1); mathProperties1.Append(smallFraction1); mathProperties1.Append(displayDefaults1); mathProperties1.Append(leftMargin1); mathProperties1.Append(rightMargin1); mathProperties1.Append(defaultJustification1); mathProperties1.Append(wrapIndent1); mathProperties1.Append(integralLimitLocation1); mathProperties1.Append(naryLimitLocation1); ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages() { Val = "ru-RU" }; ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping() { Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults2 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults3 = new Ovml.ShapeDefaults() { Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 }; Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout() { Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap() { Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults2.Append(shapeDefaults3); shapeDefaults2.Append(shapeLayout1); DecimalSymbol decimalSymbol1 = new DecimalSymbol() { Val = "," }; ListSeparator listSeparator1 = new ListSeparator() { Val = ";" }; settings1.Append(zoom1); settings1.Append(proofState1); settings1.Append(defaultTabStop1); settings1.Append(characterSpacingControl1); settings1.Append(headerShapeDefaults1); settings1.Append(footnoteDocumentWideProperties1); settings1.Append(endnoteDocumentWideProperties1); settings1.Append(compatibility1); settings1.Append(rsids1); settings1.Append(mathProperties1); settings1.Append(themeFontLanguages1); settings1.Append(colorSchemeMapping1); settings1.Append(shapeDefaults2); settings1.Append(decimalSymbol1); settings1.Append(listSeparator1); documentSettingsPart1.Settings = settings1; }
// Generates content of documentSettingsPart2. private void GenerateDocumentSettingsPart2Content(DocumentSettingsPart documentSettingsPart2) { Settings settings2 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15" } }; settings2.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"); settings2.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office"); settings2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); settings2.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); settings2.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml"); settings2.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word"); settings2.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"); settings2.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml"); settings2.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml"); settings2.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main"); Zoom zoom1 = new Zoom(){ Percent = "100" }; BordersDoNotSurroundHeader bordersDoNotSurroundHeader2 = new BordersDoNotSurroundHeader(); BordersDoNotSurroundFooter bordersDoNotSurroundFooter2 = new BordersDoNotSurroundFooter(); ProofState proofState1 = new ProofState(){ Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean }; DefaultTabStop defaultTabStop2 = new DefaultTabStop(){ Val = 840 }; DisplayHorizontalDrawingGrid displayHorizontalDrawingGrid2 = new DisplayHorizontalDrawingGrid(){ Val = 0 }; DisplayVerticalDrawingGrid displayVerticalDrawingGrid2 = new DisplayVerticalDrawingGrid(){ Val = 2 }; CharacterSpacingControl characterSpacingControl2 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.CompressPunctuation }; HeaderShapeDefaults headerShapeDefaults1 = new HeaderShapeDefaults(); Ovml.ShapeDefaults shapeDefaults1 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 }; V.TextBox textBox1 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" }; shapeDefaults1.Append(textBox1); headerShapeDefaults1.Append(shapeDefaults1); FootnoteDocumentWideProperties footnoteDocumentWideProperties1 = new FootnoteDocumentWideProperties(); FootnoteSpecialReference footnoteSpecialReference1 = new FootnoteSpecialReference(){ Id = -1 }; FootnoteSpecialReference footnoteSpecialReference2 = new FootnoteSpecialReference(){ Id = 0 }; footnoteDocumentWideProperties1.Append(footnoteSpecialReference1); footnoteDocumentWideProperties1.Append(footnoteSpecialReference2); EndnoteDocumentWideProperties endnoteDocumentWideProperties1 = new EndnoteDocumentWideProperties(); EndnoteSpecialReference endnoteSpecialReference1 = new EndnoteSpecialReference(){ Id = -1 }; EndnoteSpecialReference endnoteSpecialReference2 = new EndnoteSpecialReference(){ Id = 0 }; endnoteDocumentWideProperties1.Append(endnoteSpecialReference1); endnoteDocumentWideProperties1.Append(endnoteSpecialReference2); Compatibility compatibility2 = new Compatibility(); SpaceForUnderline spaceForUnderline2 = new SpaceForUnderline(); BalanceSingleByteDoubleByteWidth balanceSingleByteDoubleByteWidth2 = new BalanceSingleByteDoubleByteWidth(); DoNotLeaveBackslashAlone doNotLeaveBackslashAlone2 = new DoNotLeaveBackslashAlone(); UnderlineTrailingSpaces underlineTrailingSpaces2 = new UnderlineTrailingSpaces(); DoNotExpandShiftReturn doNotExpandShiftReturn2 = new DoNotExpandShiftReturn(); AdjustLineHeightInTable adjustLineHeightInTable2 = new AdjustLineHeightInTable(); UseFarEastLayout useFarEastLayout2 = new UseFarEastLayout(); CompatibilitySetting compatibilitySetting6 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" }; CompatibilitySetting compatibilitySetting7 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting8 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting9 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; CompatibilitySetting compatibilitySetting10 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DifferentiateMultirowTableHeaders, Uri = "http://schemas.microsoft.com/office/word", Val = "1" }; compatibility2.Append(spaceForUnderline2); compatibility2.Append(balanceSingleByteDoubleByteWidth2); compatibility2.Append(doNotLeaveBackslashAlone2); compatibility2.Append(underlineTrailingSpaces2); compatibility2.Append(doNotExpandShiftReturn2); compatibility2.Append(adjustLineHeightInTable2); compatibility2.Append(useFarEastLayout2); compatibility2.Append(compatibilitySetting6); compatibility2.Append(compatibilitySetting7); compatibility2.Append(compatibilitySetting8); compatibility2.Append(compatibilitySetting9); compatibility2.Append(compatibilitySetting10); Rsids rsids2 = new Rsids(); RsidRoot rsidRoot2 = new RsidRoot(){ Val = "000010BA" }; Rsid rsid21 = new Rsid(){ Val = "000010BA" }; Rsid rsid22 = new Rsid(){ Val = "000C1702" }; Rsid rsid23 = new Rsid(){ Val = "00221A5E" }; Rsid rsid24 = new Rsid(){ Val = "00535C5E" }; Rsid rsid25 = new Rsid(){ Val = "005A792B" }; Rsid rsid26 = new Rsid(){ Val = "006D4DFB" }; Rsid rsid27 = new Rsid(){ Val = "009651D6" }; Rsid rsid28 = new Rsid(){ Val = "00A215C1" }; Rsid rsid29 = new Rsid(){ Val = "00CC7467" }; Rsid rsid30 = new Rsid(){ Val = "00DC649D" }; Rsid rsid31 = new Rsid(){ Val = "00E86739" }; Rsid rsid32 = new Rsid(){ Val = "00E90381" }; Rsid rsid33 = new Rsid(){ Val = "00E930A2" }; rsids2.Append(rsidRoot2); rsids2.Append(rsid21); rsids2.Append(rsid22); rsids2.Append(rsid23); rsids2.Append(rsid24); rsids2.Append(rsid25); rsids2.Append(rsid26); rsids2.Append(rsid27); rsids2.Append(rsid28); rsids2.Append(rsid29); rsids2.Append(rsid30); rsids2.Append(rsid31); rsids2.Append(rsid32); rsids2.Append(rsid33); M.MathProperties mathProperties2 = new M.MathProperties(); M.MathFont mathFont2 = new M.MathFont(){ Val = "Cambria Math" }; M.BreakBinary breakBinary2 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before }; M.BreakBinarySubtraction breakBinarySubtraction2 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus }; M.SmallFraction smallFraction2 = new M.SmallFraction(){ Val = M.BooleanValues.Zero }; M.DisplayDefaults displayDefaults2 = new M.DisplayDefaults(); M.LeftMargin leftMargin2 = new M.LeftMargin(){ Val = (UInt32Value)0U }; M.RightMargin rightMargin2 = new M.RightMargin(){ Val = (UInt32Value)0U }; M.DefaultJustification defaultJustification2 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup }; M.WrapIndent wrapIndent2 = new M.WrapIndent(){ Val = (UInt32Value)1440U }; M.IntegralLimitLocation integralLimitLocation2 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript }; M.NaryLimitLocation naryLimitLocation2 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver }; mathProperties2.Append(mathFont2); mathProperties2.Append(breakBinary2); mathProperties2.Append(breakBinarySubtraction2); mathProperties2.Append(smallFraction2); mathProperties2.Append(displayDefaults2); mathProperties2.Append(leftMargin2); mathProperties2.Append(rightMargin2); mathProperties2.Append(defaultJustification2); mathProperties2.Append(wrapIndent2); mathProperties2.Append(integralLimitLocation2); mathProperties2.Append(naryLimitLocation2); ThemeFontLanguages themeFontLanguages2 = new ThemeFontLanguages(){ Val = "en-US", EastAsia = "ja-JP" }; ColorSchemeMapping colorSchemeMapping2 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink }; ShapeDefaults shapeDefaults2 = new ShapeDefaults(); Ovml.ShapeDefaults shapeDefaults3 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 }; V.TextBox textBox2 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" }; shapeDefaults3.Append(textBox2); Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit }; Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" }; shapeLayout1.Append(shapeIdMap1); shapeDefaults2.Append(shapeDefaults3); shapeDefaults2.Append(shapeLayout1); DecimalSymbol decimalSymbol2 = new DecimalSymbol(){ Val = "." }; ListSeparator listSeparator2 = new ListSeparator(){ Val = "," }; W15.ChartTrackingRefBased chartTrackingRefBased2 = new W15.ChartTrackingRefBased(); W15.PersistentDocumentId persistentDocumentId1 = new W15.PersistentDocumentId(){ Val = "{855411F9-778F-4476-A693-CE4F6511E7CE}" }; settings2.Append(zoom1); settings2.Append(bordersDoNotSurroundHeader2); settings2.Append(bordersDoNotSurroundFooter2); settings2.Append(proofState1); settings2.Append(defaultTabStop2); settings2.Append(displayHorizontalDrawingGrid2); settings2.Append(displayVerticalDrawingGrid2); settings2.Append(characterSpacingControl2); settings2.Append(headerShapeDefaults1); settings2.Append(footnoteDocumentWideProperties1); settings2.Append(endnoteDocumentWideProperties1); settings2.Append(compatibility2); settings2.Append(rsids2); settings2.Append(mathProperties2); settings2.Append(themeFontLanguages2); settings2.Append(colorSchemeMapping2); settings2.Append(shapeDefaults2); settings2.Append(decimalSymbol2); settings2.Append(listSeparator2); settings2.Append(chartTrackingRefBased2); settings2.Append(persistentDocumentId1); documentSettingsPart2.Settings = settings2; }
/// <summary> /// Project the parameters of the calling method/function /// </summary> /// <param name="expression"></param> /// <param name="proofState"></param> /// <returns></returns> public override IEnumerable<object> Generate(Expression expression, ProofState proofState) { var vars = proofState.GetAllDafnyVars().Values.ToList().Where(IsParam); yield return vars.Select(x => x.Variable).ToList(); }