CONTENTS
========
This directory contains the data files for the "Arrow function scope fixing bug"
benchmark (listed under "Bug Localization" in the paper).

  - trace.out : trace file (binary)
  - slice_criterion.txt : gives the slice criterion used in the paper
        "Representing and Reasoning about Dynamic Code" (ASE 2020) together
	with the expected output.
  - REF-SLICE.txt : reference slice obtained using the slicer tool.
  - SLICE-SHOULD-CONTAIN.txt : a file containing addresses of instructions
  	that should be contained in the computed slice for correctness.

An text version of the trace file, obtained by applying the trace2ascii tool to
the trace.out file, is available in the parent directory of this directory.
The format of this file	is described below.  This file is not an essential
part of the dataset but is provided for the benefit of curious readers.


DETAILS OF THE BUG
==================
V8 Version: 6.4.109
Source: https://bugs.chromium.org/p/chromium/issues/detail?id=807096
Source: https://www.exploit-db.com/exploits/44541/
Command: ./v8-6.4.109/x64.debug/d8 chrome-807096-poc.js


USING THE DATA
==============
Run the slicer as follows:

    <PATH-TO-SLICER-TOOL>/slicer -i trace.out -a 0x35e6366042b8 -p -o OUTFILE

This will write the slice computed into the file OUTFILE.

NOTE: This may produce warning messages of the form "Warning: Unknown xed reg XXX"
    where XXX is one of {X87PUSH, X87POP, TSC}.  This is OK.

To check correctness of the computed slice: the command

    grep -c -f SLICE-SHOULD-CONTAIN.txt  OUTFILE

should produce the same value as the command

    wc -l SLICE-SHOULD-CONTAIN.txt

(If these two values are the same, this means that each address mentioned in the
file SLICE-SHOULD-CONTAIN.txt occurs in the slice computed into the file OUTPUT.)


ASCII TRACE FORMAT
==================
The file 'ascii-trace.txt' is produced by the trace2ascii tool applied to the
binary trace file 'trace.out'.  It lists the instructions in the file 'trace.out'
in the order in which they occur in the trace, one instruction per line.

Each line consists of a sequence of semicolon-delimited fields in the following order:

    - position in the trace (start = 0);
    - thread id;
    - instruction address;
    - file the instruction originated in;
    - function the instruction belongs to;
    - binary encoding of the instruction (a sequence of bytes, in hex);
    - instruction mnemonic;
    - register and memory values read and written by the instruction.  These are
      labeled as follows (all numbers are in hex format):
          - R:reg=val
	  	the value val is read from register reg
	  - W:reg=val
	  	the value val is written to register reg
	  - MR[addr]=val
	  	the value val is read from memory location addr
	  - MW[addr]=val
	  	the value val is written to memory location addr


