src/Pure/PIDE/markup.scala
author wenzelm
Sat Apr 26 13:07:20 2014 +0200 (2014-04-26 ago)
changeset 56743 81370dfadb1d
parent 56733 f7700146678d
child 56843 b2bfcd8cda80
permissions -rw-r--r--
tuned signature;
wenzelm@45670
     1
/*  Title:      Pure/PIDE/markup.scala
wenzelm@45673
     2
    Module:     PIDE
wenzelm@27958
     3
    Author:     Makarius
wenzelm@27958
     4
wenzelm@56743
     5
Quasi-abstract markup elements.
wenzelm@27958
     6
*/
wenzelm@27958
     7
wenzelm@27958
     8
package isabelle
wenzelm@27958
     9
wenzelm@27970
    10
wenzelm@32450
    11
object Markup
wenzelm@32450
    12
{
wenzelm@56743
    13
  /* elements */
wenzelm@56743
    14
wenzelm@56743
    15
  object Elements
wenzelm@56743
    16
  {
wenzelm@56743
    17
    def apply(elems: Set[String]): Elements = new Elements(elems)
wenzelm@56743
    18
    def apply(elems: String*): Elements = apply(Set(elems: _*))
wenzelm@56743
    19
    val empty: Elements = apply()
wenzelm@56743
    20
    val full: Elements =
wenzelm@56743
    21
      new Elements(Set.empty)
wenzelm@56743
    22
      {
wenzelm@56743
    23
        override def apply(elem: String): Boolean = true
wenzelm@56743
    24
        override def toString: String = "Elements.full"
wenzelm@56743
    25
      }
wenzelm@56743
    26
  }
wenzelm@56743
    27
wenzelm@56743
    28
  sealed class Elements private[Markup](private val rep: Set[String])
wenzelm@56743
    29
  {
wenzelm@56743
    30
    def apply(elem: String): Boolean = rep.contains(elem)
wenzelm@56743
    31
    def + (elem: String): Elements = new Elements(rep + elem)
wenzelm@56743
    32
    def ++ (elems: Elements): Elements = new Elements(rep ++ elems.rep)
wenzelm@56743
    33
    override def toString: String = rep.mkString("Elements(", ",", ")")
wenzelm@56743
    34
  }
wenzelm@56743
    35
wenzelm@56743
    36
wenzelm@45666
    37
  /* properties */
wenzelm@29184
    38
wenzelm@29184
    39
  val NAME = "name"
wenzelm@43780
    40
  val Name = new Properties.String(NAME)
wenzelm@42136
    41
wenzelm@29184
    42
  val KIND = "kind"
wenzelm@43780
    43
  val Kind = new Properties.String(KIND)
wenzelm@29184
    44
wenzelm@52854
    45
  val INSTANCE = "instance"
wenzelm@52854
    46
  val Instance = new Properties.String(INSTANCE)
wenzelm@52854
    47
wenzelm@29184
    48
wenzelm@50201
    49
  /* basic markup */
wenzelm@29184
    50
wenzelm@45666
    51
  val Empty = Markup("", Nil)
wenzelm@45666
    52
  val Broken = Markup("broken", Nil)
wenzelm@50201
    53
wenzelm@55553
    54
  class Markup_String(val name: String, prop: String)
wenzelm@55553
    55
  {
wenzelm@55553
    56
    private val Prop = new Properties.String(prop)
wenzelm@55553
    57
wenzelm@55553
    58
    def apply(s: String): Markup = Markup(name, Prop(s))
wenzelm@55553
    59
    def unapply(markup: Markup): Option[String] =
wenzelm@55553
    60
      if (markup.name == name) Prop.unapply(markup.properties) else None
wenzelm@55553
    61
  }
wenzelm@55553
    62
wenzelm@55553
    63
  class Markup_Int(val name: String, prop: String)
wenzelm@55553
    64
  {
wenzelm@55553
    65
    private val Prop = new Properties.Int(prop)
wenzelm@55553
    66
wenzelm@55553
    67
    def apply(i: Int): Markup = Markup(name, Prop(i))
wenzelm@55553
    68
    def unapply(markup: Markup): Option[Int] =
wenzelm@55553
    69
      if (markup.name == name) Prop.unapply(markup.properties) else None
wenzelm@55553
    70
  }
wenzelm@55553
    71
wenzelm@50201
    72
wenzelm@50201
    73
  /* formal entities */
wenzelm@50201
    74
wenzelm@50201
    75
  val BINDING = "binding"
wenzelm@50201
    76
  val ENTITY = "entity"
wenzelm@50201
    77
  val DEF = "def"
wenzelm@50201
    78
  val REF = "ref"
wenzelm@50201
    79
wenzelm@50201
    80
  object Entity
wenzelm@50201
    81
  {
wenzelm@50201
    82
    def unapply(markup: Markup): Option[(String, String)] =
wenzelm@50201
    83
      markup match {
wenzelm@55553
    84
        case Markup(ENTITY, props) =>
wenzelm@55553
    85
          (props, props) match {
wenzelm@55615
    86
            case (Kind(kind), Name(name)) => Some((kind, name))
wenzelm@50201
    87
            case _ => None
wenzelm@50201
    88
          }
wenzelm@50201
    89
        case _ => None
wenzelm@50201
    90
      }
wenzelm@50201
    91
  }
wenzelm@50201
    92
wenzelm@50201
    93
wenzelm@55672
    94
  /* completion */
wenzelm@55672
    95
wenzelm@55672
    96
  val COMPLETION = "completion"
wenzelm@55914
    97
  val NO_COMPLETION = "no_completion"
wenzelm@55672
    98
wenzelm@55672
    99
wenzelm@50201
   100
  /* position */
wenzelm@50201
   101
wenzelm@50201
   102
  val LINE = "line"
wenzelm@50201
   103
  val OFFSET = "offset"
wenzelm@50201
   104
  val END_OFFSET = "end_offset"
wenzelm@50201
   105
  val FILE = "file"
wenzelm@50201
   106
  val ID = "id"
wenzelm@50201
   107
wenzelm@50201
   108
  val DEF_LINE = "def_line"
wenzelm@50201
   109
  val DEF_OFFSET = "def_offset"
wenzelm@50201
   110
  val DEF_END_OFFSET = "def_end_offset"
wenzelm@50201
   111
  val DEF_FILE = "def_file"
wenzelm@50201
   112
  val DEF_ID = "def_id"
wenzelm@50201
   113
wenzelm@50201
   114
  val POSITION_PROPERTIES = Set(LINE, OFFSET, END_OFFSET, FILE, ID)
wenzelm@50201
   115
  val POSITION = "position"
wenzelm@50201
   116
wenzelm@50201
   117
wenzelm@55552
   118
  /* embedded languages */
wenzelm@55552
   119
wenzelm@55666
   120
  val Symbols = new Properties.Boolean("symbols")
wenzelm@55666
   121
  val Antiquotes = new Properties.Boolean("antiquotes")
wenzelm@55828
   122
  val Delimited = new Properties.Boolean("delimited")
wenzelm@55615
   123
wenzelm@55552
   124
  val LANGUAGE = "language"
wenzelm@55615
   125
  object Language
wenzelm@55615
   126
  {
wenzelm@55616
   127
    val ML = "ML"
wenzelm@56278
   128
    val SML = "SML"
wenzelm@55616
   129
    val UNKNOWN = "unknown"
wenzelm@55616
   130
wenzelm@55828
   131
    def unapply(markup: Markup): Option[(String, Boolean, Boolean, Boolean)] =
wenzelm@55615
   132
      markup match {
wenzelm@55615
   133
        case Markup(LANGUAGE, props) =>
wenzelm@55828
   134
          (props, props, props, props) match {
wenzelm@55828
   135
            case (Name(name), Symbols(symbols), Antiquotes(antiquotes), Delimited(delimited)) =>
wenzelm@55828
   136
              Some((name, symbols, antiquotes, delimited))
wenzelm@55615
   137
            case _ => None
wenzelm@55615
   138
          }
wenzelm@55615
   139
        case _ => None
wenzelm@55615
   140
      }
wenzelm@55615
   141
  }
wenzelm@55552
   142
wenzelm@55552
   143
wenzelm@54702
   144
  /* external resources */
wenzelm@50201
   145
wenzelm@50201
   146
  val PATH = "path"
wenzelm@55553
   147
  val Path = new Markup_String(PATH, NAME)
wenzelm@50201
   148
wenzelm@54702
   149
  val URL = "url"
wenzelm@55553
   150
  val Url = new Markup_String(URL, NAME)
wenzelm@54702
   151
wenzelm@50201
   152
wenzelm@50201
   153
  /* pretty printing */
wenzelm@50201
   154
wenzelm@55553
   155
  val Block = new Markup_Int("block", "indent")
wenzelm@55553
   156
  val Break = new Markup_Int("break", "width")
wenzelm@50201
   157
wenzelm@51570
   158
  val ITEM = "item"
wenzelm@51574
   159
  val BULLET = "bullet"
wenzelm@51570
   160
wenzelm@50201
   161
  val SEPARATOR = "separator"
wenzelm@50201
   162
wenzelm@50201
   163
wenzelm@56548
   164
  /* text properties */
wenzelm@56548
   165
wenzelm@56548
   166
  val WORDS = "words"
wenzelm@50201
   167
wenzelm@50201
   168
  val HIDDEN = "hidden"
wenzelm@50201
   169
wenzelm@50201
   170
wenzelm@50201
   171
  /* logical entities */
wenzelm@50201
   172
wenzelm@50201
   173
  val CLASS = "class"
wenzelm@50201
   174
  val TYPE_NAME = "type_name"
wenzelm@50201
   175
  val FIXED = "fixed"
wenzelm@53378
   176
  val CASE = "case"
wenzelm@50201
   177
  val CONSTANT = "constant"
wenzelm@50201
   178
  val DYNAMIC_FACT = "dynamic_fact"
wenzelm@50201
   179
wenzelm@50201
   180
wenzelm@50201
   181
  /* inner syntax */
wenzelm@50201
   182
wenzelm@50201
   183
  val TFREE = "tfree"
wenzelm@50201
   184
  val TVAR = "tvar"
wenzelm@50201
   185
  val FREE = "free"
wenzelm@50201
   186
  val SKOLEM = "skolem"
wenzelm@50201
   187
  val BOUND = "bound"
wenzelm@50201
   188
  val VAR = "var"
wenzelm@50201
   189
  val NUMERAL = "numeral"
wenzelm@50201
   190
  val LITERAL = "literal"
wenzelm@50201
   191
  val DELIMITER = "delimiter"
wenzelm@50201
   192
  val INNER_STRING = "inner_string"
wenzelm@55033
   193
  val INNER_CARTOUCHE = "inner_cartouche"
wenzelm@50201
   194
  val INNER_COMMENT = "inner_comment"
wenzelm@50201
   195
wenzelm@50201
   196
  val TOKEN_RANGE = "token_range"
wenzelm@50201
   197
wenzelm@50201
   198
  val SORTING = "sorting"
wenzelm@50201
   199
  val TYPING = "typing"
wenzelm@50201
   200
wenzelm@50201
   201
  val ATTRIBUTE = "attribute"
wenzelm@50201
   202
  val METHOD = "method"
wenzelm@50201
   203
wenzelm@50201
   204
wenzelm@55552
   205
  /* antiquotations */
wenzelm@50201
   206
wenzelm@55526
   207
  val ANTIQUOTED = "antiquoted"
wenzelm@55526
   208
  val ANTIQUOTE = "antiquote"
wenzelm@55526
   209
wenzelm@50201
   210
  val ML_ANTIQUOTATION = "ML_antiquotation"
wenzelm@50201
   211
  val DOCUMENT_ANTIQUOTATION = "document_antiquotation"
wenzelm@50201
   212
  val DOCUMENT_ANTIQUOTATION_OPTION = "document_antiquotation_option"
wenzelm@50201
   213
wenzelm@50201
   214
wenzelm@50201
   215
  /* text structure */
wenzelm@50201
   216
wenzelm@50201
   217
  val PARAGRAPH = "paragraph"
wenzelm@50545
   218
  val TEXT_FOLD = "text_fold"
wenzelm@50201
   219
wenzelm@50201
   220
wenzelm@50201
   221
  /* ML syntax */
wenzelm@50201
   222
wenzelm@55505
   223
  val ML_KEYWORD1 = "ML_keyword1"
wenzelm@55505
   224
  val ML_KEYWORD2 = "ML_keyword2"
wenzelm@55505
   225
  val ML_KEYWORD3 = "ML_keyword3"
wenzelm@50201
   226
  val ML_DELIMITER = "ML_delimiter"
wenzelm@50201
   227
  val ML_TVAR = "ML_tvar"
wenzelm@50201
   228
  val ML_NUMERAL = "ML_numeral"
wenzelm@50201
   229
  val ML_CHAR = "ML_char"
wenzelm@50201
   230
  val ML_STRING = "ML_string"
wenzelm@50201
   231
  val ML_COMMENT = "ML_comment"
wenzelm@56278
   232
  val SML_STRING = "SML_string"
wenzelm@56278
   233
  val SML_COMMENT = "SML_comment"
wenzelm@50201
   234
wenzelm@50201
   235
  val ML_DEF = "ML_def"
wenzelm@50201
   236
  val ML_OPEN = "ML_open"
wenzelm@55837
   237
  val ML_STRUCTURE = "ML_structure"
wenzelm@50201
   238
  val ML_TYPING = "ML_typing"
wenzelm@50201
   239
wenzelm@50201
   240
wenzelm@50201
   241
  /* outer syntax */
wenzelm@50201
   242
wenzelm@55744
   243
  val COMMAND = "command"
wenzelm@55744
   244
  val KEYWORD1 = "keyword1"
wenzelm@55744
   245
  val KEYWORD2 = "keyword2"
wenzelm@55765
   246
  val KEYWORD3 = "keyword3"
wenzelm@55919
   247
  val QUASI_KEYWORD = "quasi_keyword"
wenzelm@56202
   248
  val IMPROPER = "improper"
wenzelm@50201
   249
  val OPERATOR = "operator"
wenzelm@50201
   250
  val STRING = "string"
wenzelm@50201
   251
  val ALTSTRING = "altstring"
wenzelm@50201
   252
  val VERBATIM = "verbatim"
wenzelm@55033
   253
  val CARTOUCHE = "cartouche"
wenzelm@50201
   254
  val COMMENT = "comment"
wenzelm@50201
   255
  val CONTROL = "control"
wenzelm@50201
   256
wenzelm@50201
   257
wenzelm@50201
   258
  /* timing */
wenzelm@50201
   259
wenzelm@50781
   260
  val Elapsed = new Properties.Double("elapsed")
wenzelm@50781
   261
  val CPU = new Properties.Double("cpu")
wenzelm@50781
   262
  val GC = new Properties.Double("gc")
wenzelm@50781
   263
wenzelm@50781
   264
  object Timing_Properties
wenzelm@50781
   265
  {
wenzelm@50781
   266
    def apply(timing: isabelle.Timing): Properties.T =
wenzelm@50781
   267
      Elapsed(timing.elapsed.seconds) ::: CPU(timing.cpu.seconds) ::: GC(timing.gc.seconds)
wenzelm@51662
   268
wenzelm@50781
   269
    def unapply(props: Properties.T): Option[isabelle.Timing] =
wenzelm@50781
   270
      (props, props, props) match {
wenzelm@50781
   271
        case (Elapsed(elapsed), CPU(cpu), GC(gc)) =>
wenzelm@50781
   272
          Some(new isabelle.Timing(Time.seconds(elapsed), Time.seconds(cpu), Time.seconds(gc)))
wenzelm@50781
   273
        case _ => None
wenzelm@50781
   274
      }
wenzelm@50781
   275
  }
wenzelm@50781
   276
wenzelm@50201
   277
  val TIMING = "timing"
wenzelm@50201
   278
wenzelm@50201
   279
  object Timing
wenzelm@50201
   280
  {
wenzelm@50781
   281
    def apply(timing: isabelle.Timing): Markup = Markup(TIMING, Timing_Properties(timing))
wenzelm@51662
   282
wenzelm@50201
   283
    def unapply(markup: Markup): Option[isabelle.Timing] =
wenzelm@50201
   284
      markup match {
wenzelm@50781
   285
        case Markup(TIMING, Timing_Properties(timing)) => Some(timing)
wenzelm@50201
   286
        case _ => None
wenzelm@50201
   287
      }
wenzelm@50201
   288
  }
wenzelm@50201
   289
wenzelm@50201
   290
wenzelm@51662
   291
  /* command timing */
wenzelm@51662
   292
wenzelm@51818
   293
  val COMMAND_TIMING = "command_timing"
wenzelm@51662
   294
wenzelm@51662
   295
wenzelm@50201
   296
  /* toplevel */
wenzelm@50201
   297
wenzelm@50201
   298
  val SUBGOALS = "subgoals"
wenzelm@50201
   299
  val PROOF_STATE = "proof_state"
wenzelm@50201
   300
wenzelm@50201
   301
  val STATE = "state"
wenzelm@50543
   302
  val GOAL = "goal"
wenzelm@50201
   303
  val SUBGOAL = "subgoal"
wenzelm@50215
   304
wenzelm@50450
   305
wenzelm@50201
   306
  /* command status */
wenzelm@50201
   307
wenzelm@50201
   308
  val TASK = "task"
wenzelm@50201
   309
wenzelm@50201
   310
  val ACCEPTED = "accepted"
wenzelm@50201
   311
  val FORKED = "forked"
wenzelm@50201
   312
  val JOINED = "joined"
wenzelm@50201
   313
  val RUNNING = "running"
wenzelm@50201
   314
  val FINISHED = "finished"
wenzelm@50201
   315
  val FAILED = "failed"
wenzelm@50201
   316
wenzelm@50201
   317
wenzelm@50201
   318
  /* interactive documents */
wenzelm@50201
   319
wenzelm@50201
   320
  val VERSION = "version"
wenzelm@50201
   321
  val ASSIGN = "assign"
wenzelm@50201
   322
wenzelm@50201
   323
wenzelm@50201
   324
  /* prover process */
wenzelm@50201
   325
wenzelm@50201
   326
  val PROVER_COMMAND = "prover_command"
wenzelm@50201
   327
  val PROVER_ARG = "prover_arg"
wenzelm@50201
   328
wenzelm@50201
   329
wenzelm@50201
   330
  /* messages */
wenzelm@50201
   331
lars@55316
   332
  val SERIAL = "serial"
lars@55316
   333
  val Serial = new Properties.Long(SERIAL)
wenzelm@50201
   334
wenzelm@50201
   335
  val MESSAGE = "message"
wenzelm@50201
   336
wenzelm@50201
   337
  val INIT = "init"
wenzelm@50201
   338
  val STATUS = "status"
wenzelm@50201
   339
  val REPORT = "report"
wenzelm@50500
   340
  val RESULT = "result"
wenzelm@50201
   341
  val WRITELN = "writeln"
wenzelm@50201
   342
  val TRACING = "tracing"
wenzelm@50201
   343
  val WARNING = "warning"
wenzelm@50201
   344
  val ERROR = "error"
wenzelm@50201
   345
  val PROTOCOL = "protocol"
wenzelm@50201
   346
  val SYSTEM = "system"
wenzelm@50201
   347
  val STDOUT = "stdout"
wenzelm@50201
   348
  val STDERR = "stderr"
wenzelm@50201
   349
  val EXIT = "exit"
wenzelm@50201
   350
wenzelm@50201
   351
  val WRITELN_MESSAGE = "writeln_message"
wenzelm@50201
   352
  val TRACING_MESSAGE = "tracing_message"
wenzelm@50201
   353
  val WARNING_MESSAGE = "warning_message"
wenzelm@50201
   354
  val ERROR_MESSAGE = "error_message"
wenzelm@50201
   355
wenzelm@52876
   356
  val messages =
wenzelm@50201
   357
    Map(WRITELN -> WRITELN_MESSAGE, TRACING -> TRACING_MESSAGE,
wenzelm@52876
   358
        WARNING -> WARNING_MESSAGE, ERROR -> ERROR_MESSAGE)
wenzelm@52876
   359
  val message: String => String = messages.withDefault((s: String) => s)
wenzelm@50201
   360
wenzelm@50201
   361
  val Return_Code = new Properties.Int("return_code")
wenzelm@50201
   362
wenzelm@50201
   363
  val LEGACY = "legacy"
wenzelm@50201
   364
wenzelm@50201
   365
  val NO_REPORT = "no_report"
wenzelm@50201
   366
wenzelm@50201
   367
  val BAD = "bad"
wenzelm@50201
   368
wenzelm@50500
   369
  val INTENSIFY = "intensify"
wenzelm@52643
   370
  val INFORMATION = "information"
wenzelm@50500
   371
wenzelm@50500
   372
wenzelm@50500
   373
  /* active areas */
wenzelm@50500
   374
wenzelm@50715
   375
  val BROWSER = "browser"
wenzelm@50500
   376
  val GRAPHVIEW = "graphview"
wenzelm@50500
   377
wenzelm@50500
   378
  val SENDBACK = "sendback"
wenzelm@50500
   379
  val PADDING = "padding"
wenzelm@52697
   380
  val PADDING_LINE = (PADDING, "line")
wenzelm@52697
   381
  val PADDING_COMMAND = (PADDING, "command")
wenzelm@50500
   382
wenzelm@50500
   383
  val DIALOG = "dialog"
wenzelm@50503
   384
  val Result = new Properties.String(RESULT)
wenzelm@50500
   385
wenzelm@50201
   386
wenzelm@50201
   387
  /* protocol message functions */
wenzelm@50201
   388
wenzelm@50201
   389
  val FUNCTION = "function"
wenzelm@50201
   390
  val Function = new Properties.String(FUNCTION)
wenzelm@50201
   391
wenzelm@52563
   392
  val Assign_Update: Properties.T = List((FUNCTION, "assign_update"))
wenzelm@50201
   393
  val Removed_Versions: Properties.T = List((FUNCTION, "removed_versions"))
wenzelm@50201
   394
wenzelm@52111
   395
  object Protocol_Handler
wenzelm@52111
   396
  {
wenzelm@52111
   397
    def unapply(props: Properties.T): Option[(String)] =
wenzelm@52111
   398
      props match {
wenzelm@52111
   399
        case List((FUNCTION, "protocol_handler"), (NAME, name)) => Some(name)
wenzelm@52111
   400
        case _ => None
wenzelm@52111
   401
      }
wenzelm@52111
   402
  }
wenzelm@52111
   403
wenzelm@52111
   404
  val INVOKE_SCALA = "invoke_scala"
wenzelm@50201
   405
  object Invoke_Scala
wenzelm@50201
   406
  {
wenzelm@50201
   407
    def unapply(props: Properties.T): Option[(String, String)] =
wenzelm@50201
   408
      props match {
wenzelm@52111
   409
        case List((FUNCTION, INVOKE_SCALA), (NAME, name), (ID, id)) => Some((name, id))
wenzelm@50201
   410
        case _ => None
wenzelm@50201
   411
      }
wenzelm@50201
   412
  }
wenzelm@52111
   413
wenzelm@52111
   414
  val CANCEL_SCALA = "cancel_scala"
wenzelm@50201
   415
  object Cancel_Scala
wenzelm@50201
   416
  {
wenzelm@50201
   417
    def unapply(props: Properties.T): Option[String] =
wenzelm@50201
   418
      props match {
wenzelm@52111
   419
        case List((FUNCTION, CANCEL_SCALA), (ID, id)) => Some(id)
wenzelm@50201
   420
        case _ => None
wenzelm@50201
   421
      }
wenzelm@50201
   422
  }
wenzelm@50255
   423
wenzelm@50255
   424
  object ML_Statistics
wenzelm@50255
   425
  {
wenzelm@50255
   426
    def unapply(props: Properties.T): Option[Properties.T] =
wenzelm@50255
   427
      props match {
wenzelm@50255
   428
        case (FUNCTION, "ML_statistics") :: stats => Some(stats)
wenzelm@50255
   429
        case _ => None
wenzelm@50255
   430
      }
wenzelm@50255
   431
  }
wenzelm@50975
   432
wenzelm@50975
   433
  object Task_Statistics
wenzelm@50975
   434
  {
wenzelm@50975
   435
    def unapply(props: Properties.T): Option[Properties.T] =
wenzelm@50975
   436
      props match {
wenzelm@50975
   437
        case (FUNCTION, "task_statistics") :: stats => Some(stats)
wenzelm@50975
   438
        case _ => None
wenzelm@50975
   439
      }
wenzelm@50975
   440
  }
lars@55316
   441
wenzelm@56616
   442
  object Loading_Theory
wenzelm@56616
   443
  {
wenzelm@56616
   444
    def unapply(props: Properties.T): Option[String] =
wenzelm@56616
   445
      props match {
wenzelm@56616
   446
        case List((FUNCTION, "loading_theory"), (NAME, name)) => Some(name)
wenzelm@56616
   447
        case _ => None
wenzelm@56616
   448
      }
wenzelm@56616
   449
  }
wenzelm@56616
   450
wenzelm@56616
   451
  object Use_Theories_Result
wenzelm@56616
   452
  {
wenzelm@56616
   453
    def unapply(props: Properties.T): Option[(String, Boolean)] =
wenzelm@56616
   454
      props match {
wenzelm@56616
   455
        case List((FUNCTION, "use_theories_result"),
wenzelm@56616
   456
          ("id", id), ("ok", Properties.Value.Boolean(ok))) => Some((id, ok))
wenzelm@56616
   457
        case _ => None
wenzelm@56616
   458
      }
wenzelm@56616
   459
  }
wenzelm@56616
   460
wenzelm@55555
   461
lars@55316
   462
  /* simplifier trace */
lars@55316
   463
wenzelm@55555
   464
  val SIMP_TRACE = "simp_trace"
lars@55316
   465
wenzelm@55555
   466
  val SIMP_TRACE_LOG = "simp_trace_log"
wenzelm@55555
   467
  val SIMP_TRACE_STEP = "simp_trace_step"
wenzelm@55555
   468
  val SIMP_TRACE_RECURSE = "simp_trace_recurse"
wenzelm@55555
   469
  val SIMP_TRACE_HINT = "simp_trace_hint"
wenzelm@55555
   470
  val SIMP_TRACE_IGNORE = "simp_trace_ignore"
lars@55316
   471
wenzelm@55555
   472
  val SIMP_TRACE_CANCEL = "simp_trace_cancel"
wenzelm@55555
   473
  object Simp_Trace_Cancel
lars@55316
   474
  {
lars@55316
   475
    def unapply(props: Properties.T): Option[Long] =
lars@55316
   476
      props match {
wenzelm@55555
   477
        case (FUNCTION, SIMP_TRACE_CANCEL) :: Serial(i) => Some(i)
lars@55316
   478
        case _ => None
lars@55316
   479
      }
lars@55316
   480
  }
wenzelm@45666
   481
}
wenzelm@43721
   482
wenzelm@43721
   483
wenzelm@45666
   484
sealed case class Markup(name: String, properties: Properties.T)
wenzelm@43748
   485