<commit_before>local exports   = {}

ast = require("ast")
local types = terralib.require("compiler/types")
local tutil     = types.usertypes
local Type      = types.Type
local t         = types.t
local type_meet = types.type_meet
local Scope     = types.Scope

-- Phases used in assignment statements
_FIELD_WRITE   = 'FIELD_WRITE'
_FIELD_REDUCE  = 'FIELD_REDUCE'
_SCALAR_REDUCE = 'SCALAR_REDUCE'
exports._FIELD_WRITE 		= _FIELD_WRITE
exports._FIELD_REDUCE 	= _FIELD_REDUCE
exports._SCALAR_REDUCE 	= _SCALAR_REDUCE



------------------------------------------------------------------------------
--[[ Stand-in for the luaval of an indexed global field                   ]]--
------------------------------------------------------------------------------
local FieldIndex = { kind = Type.kinds.fieldindex}
FieldIndex.__index = FieldIndex

function FieldIndex.New(field, objtype)
	return setmetatable({field=field,type=objtype}, FieldIndex)
end


------------------------------------------------------------------------------
--[[ BinaryOp Reduction detection                                         ]]--
------------------------------------------------------------------------------
local commutative = {
	['+']   = true,
	['-']   = true,
	['*']   = true,
	['/']   = true,
	['and'] = true,
	['or']  = true
}

function ast.BinaryOp:operatorCommutes ()<commit_msg>Minor changes - removed some constants from global scope.<commit_after>local exports   = {}

ast = require("ast")
local types = terralib.require("compiler/types")
local tutil     = types.usertypes
local Type      = types.Type
local t         = types.t
local type_meet = types.type_meet
local Scope     = types.Scope

-- Phases used in assignment statements
local _FIELD_WRITE   = 'FIELD_WRITE'
local _FIELD_REDUCE  = 'FIELD_REDUCE'
local _SCALAR_REDUCE = 'SCALAR_REDUCE'
exports._FIELD_WRITE 		= _FIELD_WRITE
exports._FIELD_REDUCE 	= _FIELD_REDUCE
exports._SCALAR_REDUCE 	= _SCALAR_REDUCE



------------------------------------------------------------------------------
--[[ Stand-in for the luaval of an indexed global field                   ]]--
------------------------------------------------------------------------------
local FieldIndex = { kind = Type.kinds.fieldindex}
FieldIndex.__index = FieldIndex

function FieldIndex.New(field, objtype)
	return setmetatable({field=field,type=objtype}, FieldIndex)
end


------------------------------------------------------------------------------
--[[ BinaryOp Reduction detection                                         ]]--
------------------------------------------------------------------------------
local commutative = {
	['+']   = true,
	['-']   = true,
	['*']   = true,
	['/']   = true,
	['and'] = true,
	['or']  = true
}

function ast.BinaryOp:operatorCommutes ()
{'fraction_non_alphanumeric': 0.3165829145728643, 'fraction_numerical': 0.0, 'mean_word_length': 1.4150779896013865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2053427', 'n_tokens_mistral': 747, 'n_tokens_neox': 720, 'n_words': 162}