isac-java/src/java-tests/isac/gui/mawen/TestUseCases.scala
author Walther Neuper <walther.neuper@jku.at>
Fri, 26 Mar 2021 10:45:05 +0100
changeset 5239 b4e3883d7b66
parent 5229 6bf0e95981e3
permissions -rw-r--r--
reset mathematics-engine to Isabelle2015

note: for this version libisabelle was available,
which connects front-end (Java) and back-end (Isabelle/ML)
wneuper@5107
     1
/**
wneuper@5107
     2
 * @author Walther Neuper
wneuper@5107
     3
 * Created on May 18, 2017
wneuper@5107
     4
 * (c) due to copyright terms
wneuper@5107
     5
 */
wneuper@5107
     6
wneuper@5107
     7
package isac.gui.mawen
wneuper@5107
     8
wneuper@5107
     9
import isac.bridge.Isabelle_Isac
wneuper@5107
    10
import isac.bridge.xml.DataTypes
wneuper@5107
    11
import isac.gui.mawen.syntax.Ast._   //"._" simplifies "Ast.Ast" to "Ast"
wneuper@5107
    12
walther@5239
    13
import edu.tum.cs.isabelle.japi._
wneuper@5148
    14
wneuper@5107
    15
import junit.framework.TestCase
wneuper@5107
    16
import org.junit.Assert._
wneuper@5107
    17
wneuper@5107
    18
/**
wneuper@5107
    19
 * Use Cases from Marco Mahringer's master thesis.
wneuper@5141
    20
 * We assert <code>Ast.math_string_of</code>, because <code>Formula.math_text_</code>'s String
wneuper@5141
    21
 * is used for transfer of formulas for front-end --> Isabelle_Isac.
wneuper@5143
    22
 * References use labels in mmahringer-master.tex.
wneuper@5107
    23
 */
wneuper@5107
    24
class TestUseCases extends TestCase {
wneuper@5107
    25
  
wneuper@5148
    26
  var sys_ : JSystem = null
wneuper@5148
    27
  override def setUp() {
wneuper@5148
    28
    sys_ = Isabelle_Isac.connect();
wneuper@5148
    29
  }
wneuper@5107
    30
  
wneuper@5107
    31
  /* mmahringer-master.tex \label{UC:user-guide} */
wneuper@5107
    32
  def testUC_userguide() {
wneuper@5107
    33
    println("/--BEGIN isac.gui.mawen.TestUseCases#testUC_userguide");
wneuper@5107
    34
    
wneuper@5107
    35
    var term_str = "d_d x x + d_d x (sin (x ^ 2))"
wneuper@5107
    36
    var tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
    37
    var form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
    38
    var ast = form.getTerm
wneuper@5107
    39
    //println(Ast.raw_string_of(ast))
wneuper@5107
    40
    assertEquals(ast, 
wneuper@5107
    41
      Appl(List(
wneuper@5107
    42
        Constant("Groups.plus_class.plus"),
wneuper@5107
    43
        Appl(List(
wneuper@5107
    44
          Constant("Diff.d_d"),
wneuper@5107
    45
          Variable("x"),
wneuper@5107
    46
          Variable("x"))),
wneuper@5107
    47
        Appl(List(
wneuper@5107
    48
          Constant("Diff.d_d"),
wneuper@5107
    49
          Variable("x"),
wneuper@5107
    50
          Appl(List(
wneuper@5107
    51
            Constant("Transcendental.sin"),
wneuper@5107
    52
            Appl(List(
wneuper@5107
    53
              Constant("Power.power_class.power"),
wneuper@5107
    54
              Variable("x"),
wneuper@5107
    55
              Variable("2"))))))))))
wneuper@5107
    56
    //println(Ast.math_string_of(ast))
wneuper@5107
    57
    assertEquals(math_string_of(ast), term_str)
s1520454056@5223
    58
    val ast_05 =  // copied to TestData.scala
wneuper@5181
    59
      Appl(List(
wneuper@5181
    60
        Constant("Groups.plus_class.plus"),
wneuper@5181
    61
        Appl(List(
wneuper@5181
    62
          Constant("Diff.d_d"),
wneuper@5181
    63
          Variable("x"),
wneuper@5181
    64
          Variable("x"))),
wneuper@5181
    65
        Appl(List(
wneuper@5181
    66
          Constant("Diff.d_d"),
wneuper@5181
    67
          Variable("x"),
wneuper@5181
    68
          Appl(List(                 //added to above
wneuper@5181
    69
            Constant("BOX.1"),       //added to above
wneuper@5181
    70
            Appl(List(
wneuper@5181
    71
              Constant("Transcendental.sin"),
wneuper@5181
    72
              Appl(List(             //added to above
wneuper@5181
    73
                Constant("BOX.2"),   //added to above
wneuper@5181
    74
                Appl(List(
wneuper@5181
    75
                  Constant("Power.power_class.power"),
wneuper@5181
    76
                  Variable("x"),
wneuper@5181
    77
                  Variable("2")))))))))))))
wneuper@5107
    78
wneuper@5107
    79
    term_str = "d_d bdv (sin (u)) = cos (u) * d_d bdv u"
wneuper@5107
    80
    tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
    81
    form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
    82
    ast = form.getTerm
wneuper@5107
    83
    //println(Ast.raw_string_of(ast))
wneuper@5107
    84
    assertEquals(ast, 
wneuper@5107
    85
      Appl(List(
wneuper@5107
    86
        Constant("HOL.eq"),
wneuper@5107
    87
        Appl(List(
wneuper@5107
    88
          Constant("Diff.d_d"),
wneuper@5107
    89
          Variable("bdv"),
wneuper@5107
    90
          Appl(List(
wneuper@5107
    91
            Constant("Transcendental.sin"),
wneuper@5107
    92
            Variable("u"))))),
wneuper@5107
    93
        Appl(List(
wneuper@5107
    94
          Constant("Groups.times_class.times"),
wneuper@5107
    95
          Appl(List(
wneuper@5107
    96
            Constant("Transcendental.cos"),
wneuper@5107
    97
            Variable("u"))),
wneuper@5107
    98
          Appl(List(
wneuper@5107
    99
            Constant("Diff.d_d"),
wneuper@5107
   100
            Variable("bdv"),
wneuper@5107
   101
            Variable("u"))))))))
wneuper@5107
   102
    //println(Ast.math_string_of(ast))
wneuper@5107
   103
    assertEquals(math_string_of(ast), term_str)
s1520454056@5223
   104
    val ast_06 = // copied to TestData.scala
wneuper@5181
   105
      Appl(List(
wneuper@5181
   106
        Constant("HOL.eq"),
wneuper@5181
   107
        Appl(List(
wneuper@5181
   108
          Constant("Diff.d_d"),
wneuper@5181
   109
          Variable("bdv"),
wneuper@5181
   110
          Appl(List(                 //added to above
wneuper@5181
   111
            Constant("BOX.1"),       //added to above
wneuper@5181
   112
            Appl(List(
wneuper@5181
   113
              Constant("Transcendental.sin"),
wneuper@5181
   114
              Appl(List(             //added to above
wneuper@5181
   115
                Constant("BOX.2"),   //added to above
wneuper@5181
   116
                Variable("u"))))))))),
wneuper@5181
   117
        Appl(List(
wneuper@5181
   118
          Constant("Groups.times_class.times"),
wneuper@5181
   119
          Appl(List(                 //added to above
wneuper@5181
   120
            Constant("BOX.3"),       //added to above
wneuper@5181
   121
            Appl(List(
wneuper@5181
   122
              Constant("Transcendental.cos"),
wneuper@5181
   123
              Variable("u"))))),
wneuper@5181
   124
          Appl(List(
wneuper@5181
   125
            Constant("Diff.d_d"),
wneuper@5181
   126
            Variable("bdv"),
wneuper@5181
   127
            Appl(List(               //added to above
wneuper@5181
   128
              Constant("BOX.4"),     //added to above
wneuper@5181
   129
              Variable("u")))))))))
wneuper@5107
   130
    
wneuper@5107
   131
    term_str = "d_d x x + cos (x ^ 2) * d_d x GAP"
wneuper@5107
   132
    tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   133
    form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   134
    ast = form.getTerm
wneuper@5107
   135
    //println(Ast.raw_string_of(ast))
wneuper@5107
   136
    assertEquals(ast, 
wneuper@5107
   137
      Appl(List(
wneuper@5107
   138
        Constant("Groups.plus_class.plus"),
wneuper@5107
   139
        Appl(List(
wneuper@5107
   140
          Constant("Diff.d_d"),
wneuper@5107
   141
          Variable("x"),
wneuper@5107
   142
          Variable("x"))),
wneuper@5107
   143
        Appl(List(
wneuper@5107
   144
          Constant("Groups.times_class.times"),
wneuper@5107
   145
          Appl(List(
wneuper@5107
   146
            Constant("Transcendental.cos"),
wneuper@5107
   147
            Appl(List(
wneuper@5107
   148
              Constant("Power.power_class.power"),
wneuper@5107
   149
              Variable("x"),
wneuper@5107
   150
              Variable("2"))))),
wneuper@5107
   151
          Appl(List(
wneuper@5107
   152
            Constant("Diff.d_d"),
wneuper@5107
   153
            Variable("x"),
wneuper@5107
   154
            Variable("GAP")))))))) //NOT Constant("#"), because comes from Isabelle_Isac
wneuper@5107
   155
    //println(Ast.math_string_of(ast))
wneuper@5107
   156
    assertEquals(math_string_of(ast), term_str) //Isabelle requires (sin (x ^ 2)
s1520454056@5223
   157
    val ast_07 = // copied to TestData.scala
wneuper@5181
   158
      Appl(List(
wneuper@5181
   159
        Constant("Groups.plus_class.plus"),
wneuper@5181
   160
        Appl(List(
wneuper@5181
   161
          Constant("Diff.d_d"),
wneuper@5181
   162
          Variable("x"),
wneuper@5181
   163
          Variable("x"))),
wneuper@5181
   164
        Appl(List(
wneuper@5181
   165
          Constant("Groups.times_class.times"),
wneuper@5181
   166
          Appl(List(                 //added to above
wneuper@5181
   167
            Constant("BOX.3"),       //added to above
wneuper@5181
   168
            Appl(List(
wneuper@5181
   169
              Constant("Transcendental.cos"),
wneuper@5181
   170
              Appl(List(
wneuper@5181
   171
                Constant("Power.power_class.power"),
wneuper@5181
   172
                Variable("x"),
wneuper@5181
   173
                Variable("2"))))))),
wneuper@5181
   174
          Appl(List(
wneuper@5181
   175
            Constant("Diff.d_d"),
wneuper@5181
   176
            Variable("x"),
wneuper@5181
   177
            Appl(List(               //added to above
wneuper@5181
   178
              Constant("BOX.4"),     //added to above
wneuper@5181
   179
              Variable("GAP")))))))))
wneuper@5107
   180
     
wneuper@5107
   181
    println("\\--END isac.gui.mawen.TestUseCases#testUC_userguide");
wneuper@5107
   182
  }
wneuper@5107
   183
  
wneuper@5107
   184
  /* mmahringer-master.tex \label{UC:mult-frac} */
wneuper@5107
   185
  def testUC_multfrac() {
wneuper@5107
   186
    println("/--BEGIN isac.gui.mawen.TestUseCases#testUC_multfrac");
wneuper@5107
   187
    
wneuper@5107
   188
    var term_str = "Simplify (1 + 1 / 2 + (2 / (x + 3) + 2 / (x - 3)) / (8 * x / (x ^ 2 - 9)))"
wneuper@5107
   189
    var tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   190
    var form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   191
    var ast = form.getTerm
wneuper@5107
   192
    assertEquals(ast,
wneuper@5107
   193
      Appl(List(Constant("Simplify.Simplify"), Appl(List(Constant("Groups.plus_class.plus"), Appl(List(Constant("Groups.plus_class.plus"), Variable("1"), Appl(List(Constant("Fields.inverse_class.divide"), Variable("1"), Variable("2"))))), Appl(List(Constant("Fields.inverse_class.divide"), Appl(List(Constant("Groups.plus_class.plus"), Appl(List(Constant("Fields.inverse_class.divide"), Variable("2"), Appl(List(Constant("Groups.plus_class.plus"), Variable("x"), Variable("3"))))), Appl(List(Constant("Fields.inverse_class.divide"), Variable("2"), Appl(List(Constant("Groups.minus_class.minus"), Variable("x"), Variable("3"))))))), Appl(List(Constant("Fields.inverse_class.divide"), Appl(List(Constant("Groups.times_class.times"), Variable("8"), Variable("x"))), Appl(List(Constant("Groups.minus_class.minus"), Appl(List(Constant("Power.power_class.power"), Variable("x"), Variable("2"))), Variable("9"))))))))))))
wneuper@5107
   194
    assertEquals(term_str, math_string_of(ast))
wneuper@5107
   195
wneuper@5107
   196
    term_str = "1 + 1 / 2 + (2 / (x + 3) + 2 / (x - 3)) / (8 * x / (x ^ 2 - 9))"
wneuper@5107
   197
    tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   198
    form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   199
    ast = form.getTerm
wneuper@5107
   200
    assertEquals(ast,
wneuper@5107
   201
      Appl(List(Constant("Groups.plus_class.plus"), Appl(List(Constant("Groups.plus_class.plus"), Variable("1"), Appl(List(Constant("Fields.inverse_class.divide"), Variable("1"), Variable("2"))))), Appl(List(Constant("Fields.inverse_class.divide"), Appl(List(Constant("Groups.plus_class.plus"), Appl(List(Constant("Fields.inverse_class.divide"), Variable("2"), Appl(List(Constant("Groups.plus_class.plus"), Variable("x"), Variable("3"))))), Appl(List(Constant("Fields.inverse_class.divide"), Variable("2"), Appl(List(Constant("Groups.minus_class.minus"), Variable("x"), Variable("3"))))))), Appl(List(Constant("Fields.inverse_class.divide"), Appl(List(Constant("Groups.times_class.times"), Variable("8"), Variable("x"))), Appl(List(Constant("Groups.minus_class.minus"), Appl(List(Constant("Power.power_class.power"), Variable("x"), Variable("2"))), Variable("9"))))))))))
wneuper@5107
   202
    assertEquals(term_str, math_string_of(ast))
wneuper@5107
   203
    
wneuper@5107
   204
    println("\\--END isac.gui.mawen.TestUseCases#testUC_multfrac");
wneuper@5107
   205
  }
wneuper@5107
   206
wneuper@5107
   207
  //\label{UC:gaps} --------------------------------------------------------------------
wneuper@5107
   208
  /*
wneuper@5107
   209
	TODO in cooperation with mmahringer
wneuper@5107
   210
   */
wneuper@5107
   211
wneuper@5107
   212
  /* mmahringer-master.pdf \label{UC:eng-math} */
wneuper@5107
   213
  def testUC_engmath() {
wneuper@5107
   214
    println("/--BEGIN isac.gui.mawen.TestUseCases#testUC_engmath");
wneuper@5107
   215
    
wneuper@5114
   216
    // the integral's "D x" is only input, NOT output                                            -------------vvv
wneuper@5114
   217
    //assertEquals("y (x) = Integral (c_3 + 1 / (-1 * EI ) * (c_2 * x + c / 2 * x ^ 2 + -1 * q_0 / 6 * x ^ 3)) x"
wneuper@5114
   218
    var term_str = "y (x) = Integral (c_3 + 1 / (-1 * EI ) * (c_2 * x + c / 2 * x ^ 2 + -1 * q_0 / 6 * x ^ 3)) D x"
wneuper@5107
   219
    var tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   220
    var form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   221
    var ast = form.getTerm
wneuper@5107
   222
    assertEquals(ast,    
wneuper@5107
   223
      Appl(List(
wneuper@5107
   224
        Constant("HOL.eq"),
wneuper@5107
   225
        Appl(List(Variable/*NOT Constant*/("y"), Variable("x"))),
wneuper@5107
   226
        Appl(List(
wneuper@5107
   227
          Constant("Integrate.Integral"),
wneuper@5107
   228
          Appl(List(
wneuper@5107
   229
            Constant("Groups.plus_class.plus"),
wneuper@5107
   230
            Variable("c_3"),
wneuper@5107
   231
            Appl(List(
wneuper@5107
   232
              Constant("Groups.times_class.times"),
wneuper@5107
   233
              Appl(List(
wneuper@5107
   234
                Constant("Fields.inverse_class.divide"),
wneuper@5107
   235
                Variable("1"),
wneuper@5107
   236
                Appl(List(
wneuper@5107
   237
                  Constant("Groups.times_class.times"),
wneuper@5107
   238
                  Variable("-1"),
wneuper@5107
   239
                  Constant("Biegelinie.EI"))))),
wneuper@5107
   240
                  Appl(List(
wneuper@5107
   241
                    Constant("Groups.plus_class.plus"),
wneuper@5107
   242
                    Appl(List(
wneuper@5107
   243
                      Constant("Groups.plus_class.plus"),
wneuper@5107
   244
                      Appl(List(
wneuper@5107
   245
                        Constant("Groups.times_class.times"), Variable("c_2"), Variable("x"))),
wneuper@5107
   246
                      Appl(List(
wneuper@5107
   247
                        Constant("Groups.times_class.times"),
wneuper@5107
   248
                          Appl(List(
wneuper@5107
   249
                            Constant("Fields.inverse_class.divide"), Variable("c"), Variable("2"))),
wneuper@5107
   250
                          Appl(List(
wneuper@5107
   251
                            Constant("Power.power_class.power"), Variable("x"), Variable("2"))))))),
wneuper@5107
   252
                    Appl(List(
wneuper@5107
   253
                      Constant("Groups.times_class.times"),
wneuper@5107
   254
                      Appl(List(
wneuper@5107
   255
                        Constant("Fields.inverse_class.divide"),
wneuper@5107
   256
                        Appl(List(
wneuper@5107
   257
                          Constant("Groups.times_class.times"), Variable("-1"), Variable("q_0"))),
wneuper@5107
   258
                        Variable("6"))),
wneuper@5107
   259
                      Appl(List(Constant("Power.power_class.power"), Variable("x"), Variable("3"))))))))))),
wneuper@5107
   260
          Variable("x")))))
wneuper@5107
   261
    )
wneuper@5114
   262
    assertEquals("y (x) = Integral (c_3 + 1 / (-1 * EI ) * (c_2 * x + c / 2 * x ^ 2 + -1 * q_0 / 6 * x ^ 3)) x", 
wneuper@5114
   263
      math_string_of(ast))
wneuper@5107
   264
wneuper@5107
   265
    
wneuper@5107
   266
    //NOTE: -----------vv (reason unclear):
wneuper@5107
   267
    //term_str = "Problem (Biegelinie, [setzeRandbedingungen, Biegelinien])"  //NOT ok
wneuper@5141
   268
    term_str =    "Probl (Biegelinie , [setzeRandbedingungen, Biegelinien])"  //OK
wneuper@5107
   269
    tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   270
    form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   271
    ast = form.getTerm
wneuper@5141
   272
    //println(math_string_of(ast))
wneuper@5141
   273
    assertEquals(term_str, math_string_of(ast))
wneuper@5141
   274
wneuper@5115
   275
    term_str = "[L * q_0 = c, 0 = (2 * c_2 + 2 * L * c + -1 * L ^ 2 * q_0) / 2, 0 = c_4, 0 = c_3]"
wneuper@5107
   276
    tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   277
    form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   278
    ast = form.getTerm
wneuper@5115
   279
    //println(raw_string_of(ast))
wneuper@5115
   280
    assertEquals(ast,    
wneuper@5115
   281
      Appl(List(Constant("_list"), Appl(List(Constant("_args"), Appl(List(Constant("HOL.eq"), Appl(List(Constant("Groups.times_class.times"), Variable("L"), Variable("q_0"))), Variable("c"))), Appl(List(Constant("_args"), Appl(List(Constant("HOL.eq"), Variable("0"), Appl(List(Constant("Fields.inverse_class.divide"), Appl(List(Constant("Groups.plus_class.plus"), Appl(List(Constant("Groups.plus_class.plus"), Appl(List(Constant("Groups.times_class.times"), Variable("2"), Variable("c_2"))), Appl(List(Constant("Groups.times_class.times"), Appl(List(Constant("Groups.times_class.times"), Variable("2"), Variable("L"))), Variable("c"))))), Appl(List(Constant("Groups.times_class.times"), Appl(List(Constant("Groups.times_class.times"), Variable("-1"), Appl(List(Constant("Power.power_class.power"), Variable("L"), Variable("2"))))), Variable("q_0"))))), Variable("2"))))), Appl(List(Constant("_args"), Appl(List(Constant("HOL.eq"), Variable("0"), Variable("c_4"))), Appl(List(Constant("HOL.eq"), Variable("0"), Variable("c_3")))))))))))
wneuper@5115
   282
    )    
wneuper@5115
   283
    assertEquals(term_str, math_string_of(ast))
wneuper@5107
   284
wneuper@5107
   285
    println("\\--END isac.gui.mawen.TestUseCases#testUC_engmath");
wneuper@5107
   286
  }
wneuper@5107
   287
wneuper@5107
   288
  /* mmahringer-master.pdf \label{UC:if-then-else} */
wneuper@5107
   289
  def testUC_ifthenelse() {
wneuper@5107
   290
    println("/--BEGIN isac.gui.mawen.TestUseCases#testUC_ifthenelse");
wneuper@5107
   291
    
wneuper@5107
   292
    //if 0 < n then fac n = n * fac (n - 1) else 1
wneuper@5107
   293
      //NOTE:  Isabelle error messages indicates problems with termination
wneuper@5107
   294
      //  Coercion inference failed:
wneuper@5107
   295
      //  no supremum
wneuper@5107
   296
      //  
wneuper@5107
   297
      //  Cannot fulfil subtype constraints:
wneuper@5107
   298
      //    bool  <:  ??'a   from function Application  If (0 < n) (fac n = n * fac (n - 1))
wneuper@5107
   299
      //    ??'a  <:  ??'b   from function Ast.Application
wneuper@5107
   300
      //      if 0 < n then fac n = n * fac (n - 1) else 1
wneuper@5107
   301
wneuper@5107
   302
    var term_str = 
wneuper@5107
   303
      "Program Simplify t_t =" +
wneuper@5107
   304
      "  Repeat (" +
wneuper@5107
   305
      "    Try (Rewrite_Set klammern_aufloesen False) @@" +
wneuper@5107
   306
      "    Try (Rewrite_Set ordne_alphabetisch False) @@" +
wneuper@5107
   307
      "    Try (Rewrite_Set fasse_zusammen False) @@" +
wneuper@5107
   308
      "    Try (Rewrite_Set verschoenere False)) t_t"
wneuper@5107
   309
    //NOTE: pretty blocks have not yet been considered
wneuper@5107
   310
    var tree = sys_.invoke(isac.bridge.IsacOperations.SCALATERM_OF_STRING, term_str)
wneuper@5107
   311
    var form = DataTypes.xml_to_Formula_NEW(tree)
wneuper@5107
   312
    var ast = form.getTerm
wneuper@5107
   313
    assertEquals(ast,
wneuper@5107
   314
      Appl(List(Constant("HOL.eq"), Appl(List(Variable("Program"), Constant("Simplify.Simplify"), Variable("t_t"))), Appl(List(Constant("Script.Repeat"), Appl(List(Constant("Script.Seq"), Appl(List(Constant("Script.Try"), Appl(List(Constant("Script.Rewrite'_Set"), Variable("klammern_aufloesen"), Constant("HOL.False"))))), Appl(List(Constant("Script.Seq"), Appl(List(Constant("Script.Try"), Appl(List(Constant("Script.Rewrite'_Set"), Variable("ordne_alphabetisch"), Constant("HOL.False"))))), Appl(List(Constant("Script.Seq"), Appl(List(Constant("Script.Try"), Appl(List(Constant("Script.Rewrite'_Set"), Variable("fasse_zusammen"), Constant("HOL.False"))))), Appl(List(Constant("Script.Try"), Appl(List(Constant("Script.Rewrite'_Set"), Variable("verschoenere"), Constant("HOL.False"))))))))))), Variable("t_t")))))
wneuper@5107
   315
    )
wneuper@5194
   316
    assertEquals(math_string_of(ast), "Program Simplify  t_t = Repeat (Seq (Try (Rewrite'_Set klammern_aufloesen False )) (Seq (Try (Rewrite'_Set ordne_alphabetisch False )) (Seq (Try (Rewrite'_Set fasse_zusammen False )) (Try (Rewrite'_Set verschoenere False ))))) t_t")
wneuper@5107
   317
   
wneuper@5107
   318
    println("\\--END isac.gui.mawen.TestUseCases#testUC_ifthenelse");
wneuper@5107
   319
  }
wneuper@5107
   320
wneuper@5148
   321
  override def tearDown() {
wneuper@5148
   322
    sys_.dispose()
wneuper@5148
   323
    super.tearDown()
wneuper@5148
   324
  }
walther@5239
   325
}