<commit_before>package org.mozartoz.bootcompiler
package symtab

import oz._

import scala.collection.mutable.HashMap

class Builtins {
  val builtinByName = new HashMap[String, Builtin]
  val baseEnvironment = new HashMap[String, OzValue]

  lazy val topLevelEnvironment = Map.empty ++ baseEnvironment

  lazy val unaryOpToBuiltin = Map(
      //"~" -> builtinByName("Number.'~'"),

      "@" -> builtinByName("Cell.access")
  )

  lazy val binaryOpToBuiltin = Map(
      "==" -> builtinByName("Value.'=='"),
      "\\=" -> builtinByName("Value.'\\='"),

      "+" -> builtinByName("Number.'+'"),
      "-" -> builtinByName("Number.'-'"),
      "*" -> builtinByName("Number.'*'"),
      "/" -> builtinByName("Float.'/'"),
      "div" -> builtinByName("Int.div"),
      "mod" -> builtinByName("Int.mod"),

      /*"<" -> builtinByName("Value.'<'"),
      "=<" -> builtinByName("Value.'=<'"),
      ">" -> builtinByName("Value.'>'"),
      ">=" -> builtinByName("Value.'>='"),*/

      "." -> builtinByName("Value.'.'"),

      ":=" -> builtinByName("Cell.exchangeFun")
  )

  lazy val createThread = builtinByName("Thread.create")

  lazy val makeRecordDynamic = builtinByName("Record.makeDynamic")

  lazy val plus1 = builtinByName("Int.'+1'")
  lazy val minus1 = builtinByName("Int.'-1'")

  lazy val cellExchange = builtinByName("Cell.exchangeFun")
  lazy val cellAccess = builtinByName("Cell.access")
  lazy val cellAssign = builtinByName("Cell.assign")
}<commit_msg>Added support for the operators ~ =< < >= and >.<commit_after>package org.mozartoz.bootcompiler
package symtab

import oz._

import scala.collection.mutable.HashMap

class Builtins {
  val builtinByName = new HashMap[String, Builtin]
  val baseEnvironment = new HashMap[String, OzValue]

  lazy val topLevelEnvironment = Map.empty ++ baseEnvironment

  lazy val unaryOpToBuiltin = Map(
      "~" -> builtinByName("Number.'~'"),

      "@" -> builtinByName("Cell.access")
  )

  lazy val binaryOpToBuiltin = Map(
      "==" -> builtinByName("Value.'=='"),
      "\\=" -> builtinByName("Value.'\\='"),

      "+" -> builtinByName("Number.'+'"),
      "-" -> builtinByName("Number.'-'"),
      "*" -> builtinByName("Number.'*'"),
      "/" -> builtinByName("Float.'/'"),
      "div" -> builtinByName("Int.div"),
      "mod" -> builtinByName("Int.mod"),

      "=<" -> builtinByName("Value.'=<'"),
      "<" -> builtinByName("Value.'<'"),
      ">=" -> builtinByName("Value.'>='"),
      ">" -> builtinByName("Value.'>'"),

      "." -> builtinByName("Value.'.'"),

      ":=" -> builtinByName("Cell.exchangeFun")
  )

  lazy val createThread = builtinByName("Thread.create")

  lazy val makeRecordDynamic = builtinByName("Record.makeDynamic")

  lazy val plus1 = builtinByName("Int.'+1'")
  lazy val minus1 = builtinByName("Int.'-1'")

  lazy val cellExchange = builtinByName("Cell.exchangeFun")
  lazy val cellAccess = builtinByName("Cell.access")
  lazy val cellAssign = builtinByName("Cell.assign")
}
{'fraction_non_alphanumeric': 0.20397172669134972, 'fraction_numerical': 0.0026926960619320095, 'mean_word_length': 3.5167173252279635, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1696680', 'n_tokens_mistral': 958, 'n_tokens_neox': 995, 'n_words': 164}