
    L-Ph                    r   d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddlZddlZddlZddlZddlmZmZmZ ddlmZmZmZ ddlmZmZ ddlmZmZ ddlm Z m!Z! dd	l"m#Z#m$Z$m%Z% dd
l&m'Z' ddl(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z. ddl/m0Z0  e!e          ZdZ1dZ2ddZ3 G d d          Z4ddZ5dS )zSQLite coverage data.    )annotationsN)castAnyCallable)
CollectionMappingSequence)NoDebugging	auto_repr)CoverageException	DataError)file_be_goneisolate_module)numbits_to_numsnumbits_unionnums_to_numbits)SqliteDb)AnyCallableFilePathTArc	TDebugCtlTLineNoTWarnFn)__version__   a  CREATE TABLE coverage_schema (
    -- One row, to record the version of the schema in this db.
    version integer
);

CREATE TABLE meta (
    -- Key-value pairs, to record metadata about the data
    key text,
    value text,
    unique (key)
    -- Possible keys:
    --  'has_arcs' boolean      -- Is this data recording branches?
    --  'sys_argv' text         -- The coverage command line that recorded the data.
    --  'version' text          -- The version of coverage.py that made the file.
    --  'when' text             -- Datetime when the file was created.
);

CREATE TABLE file (
    -- A row per file measured.
    id integer primary key,
    path text,
    unique (path)
);

CREATE TABLE context (
    -- A row per context measured.
    id integer primary key,
    context text,
    unique (context)
);

CREATE TABLE line_bits (
    -- If recording lines, a row per context per file executed.
    -- All of the line numbers for that file/context are in one numbits.
    file_id integer,            -- foreign key to `file`.
    context_id integer,         -- foreign key to `context`.
    numbits blob,               -- see the numbits functions in coverage.numbits
    foreign key (file_id) references file (id),
    foreign key (context_id) references context (id),
    unique (file_id, context_id)
);

CREATE TABLE arc (
    -- If recording branches, a row per context per from/to line transition executed.
    file_id integer,            -- foreign key to `file`.
    context_id integer,         -- foreign key to `context`.
    fromno integer,             -- line number jumped from.
    tono integer,               -- line number jumped to.
    foreign key (file_id) references file (id),
    foreign key (context_id) references context (id),
    unique (file_id, context_id, fromno, tono)
);

CREATE TABLE tracer (
    -- A row per file indicating the tracer used for that file.
    file_id integer primary key,
    tracer text,
    foreign key (file_id) references file (id)
);
methodr   returnc                H     t          j                   d fd            }|S )	z4A decorator for methods that should hold self._lock.selfCoverageDataargsr   kwargsr   c                n   | j                             d          r*| j                             d| j        dj                    | j        5  | j                             d          r*| j                             d| j        dj                     | g|R i |cd d d            S # 1 swxY w Y   d S )NlockzLocking z for zLocked  )_debugshouldwrite_lock__name__)r   r!   r"   r   s      P/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/coverage/sqldata.py_wrappedz_locked.<locals>._wrappedt   s   ;f%% 	OKMMMFOMMNNNZ 	1 	1{!!&)) S!!"QTZ"Q"Q"Q"QRRR6$000000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1s   AB**B.1B.)r   r    r!   r   r"   r   r   r   )	functoolswraps)r   r+   s   ` r*   _lockedr.   r   s=    _V1 1 1 1 1 1 O    c                     e Zd ZdZ	 	 	 	 	 dWdXdZeZdYdZdYdZdYdZ	dYdZ
dZdZd[dZd\dZd]dZd^dZd_d`d"Zdad$Zedbd&            ZdYd'Zdcd(Zdcd)Zeddd,            Zeded/            Zdfdgd2Zedhd5            Zdidjd8Zdkdld;Zdmd<Z	 dkdnd@Zd_dodBZdYdCZ dYdDZ!dYdEZ"d\dFZ#dpdHZ$dpdIZ%dqdJZ&drdKZ'dsdNZ(dtdPZ)dudRZ*dvdTZ+e,dwdV            Z-dS )xr    a}  Manages collected coverage data, including file storage.

    This class is the public supported API to the data that coverage.py
    collects during program execution.  It includes information about what code
    was executed. It does not include information from the analysis phase, to
    determine what lines could have been executed, or what lines were not
    executed.

    .. note::

        The data file is currently a SQLite database file, with a
        :ref:`documented schema <dbschema>`. The schema is subject to change
        though, so be careful about querying it directly. Use this API if you
        can to isolate yourself from changes.

    There are a number of kinds of data that can be collected:

    * **lines**: the line numbers of source lines that were executed.
      These are always available.

    * **arcs**: pairs of source and destination line numbers for transitions
      between source lines.  These are only available if branch coverage was
      used.

    * **file tracer names**: the module names of the file tracer plugins that
      handled each file in the data.

    Lines, arcs, and file tracer names are stored for each source file. File
    names in this API are case-sensitive, even on platforms with
    case-insensitive file systems.

    A data file either stores lines, or arcs, but not both.

    A data file is associated with the data when the :class:`CoverageData`
    is created, using the parameters `basename`, `suffix`, and `no_disk`. The
    base name can be queried with :meth:`base_filename`, and the actual file
    name being used is available from :meth:`data_filename`.

    To read an existing coverage.py data file, use :meth:`read`.  You can then
    access the line, arc, or file tracer data with :meth:`lines`, :meth:`arcs`,
    or :meth:`file_tracer`.

    The :meth:`has_arcs` method indicates whether arc data is available.  You
    can get a set of the files in the data with :meth:`measured_files`.  As
    with most Python containers, you can determine if there is any data at all
    by using this object as a boolean value.

    The contexts for each line in a file can be read with
    :meth:`contexts_by_lineno`.

    To limit querying to certain contexts, use :meth:`set_query_context` or
    :meth:`set_query_contexts`. These will narrow the focus of subsequent
    :meth:`lines`, :meth:`arcs`, and :meth:`contexts_by_lineno` calls. The set
    of all measured context names can be retrieved with
    :meth:`measured_contexts`.

    Most data files will be created by coverage.py itself, but you can use
    methods here to create data files if you like.  The :meth:`add_lines`,
    :meth:`add_arcs`, and :meth:`add_file_tracers` methods add data, in ways
    that are convenient for coverage.py.

    To record data for contexts, use :meth:`set_context` to set a context to
    be used for subsequent :meth:`add_lines` and :meth:`add_arcs` calls.

    To add a source file without any measured data, use :meth:`touch_file`,
    or :meth:`touch_files` for a list of such files.

    Write the data to its file with :meth:`write`.

    You can clear the data in memory with :meth:`erase`.  Data for specific
    files can be removed from the database with :meth:`purge_files`.

    Two data collections can be combined by using :meth:`update` on one
    :class:`CoverageData`, passing it the other.

    Data in a :class:`CoverageData` can be serialized and deserialized with
    :meth:`dumps` and :meth:`loads`.

    The methods used during the coverage.py collection phase
    (:meth:`add_lines`, :meth:`add_arcs`, :meth:`set_context`, and
    :meth:`add_file_tracers`) are thread-safe.  Other methods may not be.

    NFbasenameFilePath | Nonesuffixstr | bool | Noneno_diskboolwarnTWarnFn | NonedebugTDebugCtl | Noner   Nonec                   || _         t          j                            |pd          | _        || _        || _        |pt                      | _        | 	                                 i | _
        i | _        t          j                    | _        t          j                    | _        d| _        d| _        d| _        d| _        d| _        d| _        dS )a  Create a :class:`CoverageData` object to hold coverage-measured data.

        Arguments:
            basename (str): the base name of the data file, defaulting to
                ".coverage". This can be a path to a file in another directory.
            suffix (str or bool): has the same meaning as the `data_suffix`
                argument to :class:`coverage.Coverage`.
            no_disk (bool): if True, keep all data in memory, and don't
                write any disk file.
            warn: a warning callback function, accepting a warning message
                argument.
            debug: a `DebugControl` object (optional)

        z	.coverageFN)_no_diskospathabspath	_basename_suffix_warnr
   r%   _choose_filename	_file_map_dbsgetpid_pid	threadingRLockr(   
_have_used
_has_lines	_has_arcs_current_context_current_context_id_query_context_ids)r   r1   r3   r5   r7   r9   s         r*   __init__zCoverageData.__init__   s    ,  )@[AA
,{}})+)+	IKK	_&&
  ,0/3 48r/   c                    | j         r	d| _        dS | j        | _        t          | j                  }|r| xj        d| z  c_        dS dS )z.Set self._filename based on inited attributes.:memory:.N)r=   	_filenamerA   filename_suffixrB   )r   r3   s     r*   rD   zCoverageData._choose_filename  s[    = 	/'DNNN!^DN$T\22F /,f,,./ /r/   c                    | j         s7| j                                        D ]}|                                 i | _        i | _        d| _        d| _        dS )zReset our attributes.FN)r=   rF   valuescloserE   rK   rO   )r   dbs     r*   _resetzCoverageData._reset  s[    } 	i&&((  



DI#'   r/   c                   | j                             d          r"| j                             d| j                   t	          | j        | j                   | j        t          j                    <   |                                  dS )z0Open an existing db file, and read its metadata.dataiozOpening data file N)	r%   r&   r'   rU   r   rF   rI   	get_ident_read_dbr   s    r*   _open_dbzCoverageData._open_db  sp    ;h'' 	GKE4>EEFFF+3DNDK+P+P	)%''(r/   c                   | j         t          j                             5 }	 |                    d          }|J 	 |d         }|t          k    r.t          d                    | j        |t                              ng# t          $ rZ}dt          |          v r| 
                    |           n)t          d                    | j        |                    |Y d}~nd}~ww xY w|                    d          }|4t          t          |d                             | _        | j         | _        |                    d          5 }|D ]\  }}|| j        |<   	 ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )	zARead the metadata from a database so that we are ready to use it.z#select version from coverage_schemaNr   z;Couldn't use data file {!r}: wrong schema: {} instead of {}zno such table: coverage_schemaz:Data file {!r} doesn't seem to be a coverage data file: {}z-select value from meta where key = 'has_arcs'select id, path from file)rF   rI   r^   execute_oneSCHEMA_VERSIONr   formatrU   	Exceptionstr_init_dbr6   intrM   rL   executerE   )r   rZ   rowschema_versionexccurfile_idr?   s           r*   r_   zCoverageData._read_db   s7   Yy*,,- 	3nn%JKK "%Q!^33#U\\ NNN    4    3s3xx??MM"%%%%#T[[ NC   	 &%%%%$ ..!PQQC!%c#a&kk!2!2&*n"4788 3C%( 3 3MGT+2DN4((33 3 3 3 3 3 3 3 3 3 3 3 3 3 37	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3s`   E<A=AE<=
C!ACE<C!!A#E<E$E<$E(	(E<+E(	,E<<F F rZ   r   c           
     4   | j                             d          r"| j                             d| j                   |                    t
                     |                    dt          f           dt          fg}| j                             d          rk|	                    dt          t          t          dd                    fd	t          j                                                            d
          fg           |                    d|           dS )z+Write the initial contents of the database.r]   zIniting data file z0insert into coverage_schema (version) values (?)versionprocesssys_argvargvNwhenz%Y-%m-%d %H:%M:%S5insert or ignore into meta (key, value) values (?, ?))r%   r&   r'   rU   executescriptSCHEMAexecute_voidre   r   extendrh   getattrsysdatetimenowstrftimeexecutemany_void)r   rZ   	meta_datas      r*   ri   zCoverageData._init_dbA  s   ;h'' 	GKE4>EEFFF
   
J^L]^^^
 $
	 ;i(( 	Sfd!;!;<<=*..0099:MNNO    	SU^_____r/   c                    t          j                    | j        vr|                                  | j        t          j                             S )zGet the SqliteDb object to use.)rI   r^   rF   ra   r`   s    r*   _connectzCoverageData._connectT  s;      	11MMOOOy,..//r/   c                   t          j                    | j        vr&t          j                            | j                  sdS 	 |                                 5 }|                    d          5 }t          t          |                    cd d d            cd d d            S # 1 swxY w Y   	 d d d            d S # 1 swxY w Y   d S # t          $ r Y dS w xY w)NFzselect * from file limit 1)rI   r^   rF   r>   r?   existsrU   r   rk   r6   listr   )r   conro   s      r*   __bool__zCoverageData.__bool__Z  sk   !!2227>>$.;Y;Y25	 +C[[!=>> +#S		??+ + + + + + ++ + + + + + + ++ + + + + + + + ++ + + + + + + + + + + + + + + + + + ! 	 	 	55	s`   C B:,B!B:C !B%	%B:(B%	)B:-C :B>>C B>C 
CCbytesc                R   | j                             d          r"| j                             d| j                   |                                 5 }|                                }dt          j        |                    d                    z   cddd           S # 1 swxY w Y   dS )a  Serialize the current data to a byte string.

        The format of the serialized data is not documented. It is only
        suitable for use with :meth:`loads` in the same version of
        coverage.py.

        Note that this serialization is not what gets stored in coverage data
        files.  This method is meant to produce bytes that can be transmitted
        elsewhere and then deserialized with :meth:`loads`.

        Returns:
            A byte string of serialized data.

        .. versionadded:: 5.0

        r]   zDumping data from data file    zutf-8N)	r%   r&   r'   rU   r   dumpzlibcompressencode)r   r   scripts      r*   dumpszCoverageData.dumpsd  s    " ;h'' 	QKOT^OOPPP]]__ 	@XXZZF$-g(>(>???	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@s   >BB #B datac                L   | j                             d          r"| j                             d| j                   |dd         dk    r+t	          d|dd         dt          |           d	          t          j        |dd                                       d
          }t          | j        | j                   x| j
        t          j                    <   }|5  |                    |           ddd           n# 1 swxY w Y   |                                  d| _        dS )a  Deserialize data from :meth:`dumps`.

        Use with a newly-created empty :class:`CoverageData` object.  It's
        undefined what happens if the object already has data in it.

        Note that this is not for reading data from a coverage data file.  It
        is only for use on data you produced with :meth:`dumps`.

        Arguments:
            data: A byte string of serialized data produced by :meth:`dumps`.

        .. versionadded:: 5.0

        r]   zLoading data into data file N   r   zUnrecognized serialization: (   z
 (head of z bytes)r   T)r%   r&   r'   rU   r   lenr   
decompressdecoder   rF   rI   r^   rx   r_   rK   )r   r   r   rZ   s       r*   loadszCoverageData.loads{  s]    ;h'' 	QKOT^OOPPP8tXtCRCyXXc$iiXXX   abb**11'::080U0UU	)%''(2 	% 	%V$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%s   C>>DDfilenamerh   add
int | Nonec                    || j         vrM|rK|                                 5 }|                    d|f          | j         |<   ddd           n# 1 swxY w Y   | j                             |          S )zGet the file id for `filename`.

        If filename is not in the database yet, add it if `add` is True.
        If `add` is not True, return None.
        z-insert or replace into file (path) values (?)N)rE   r   execute_for_rowidget)r   r   r   r   s       r*   _file_idzCoverageData._file_id  s     4>)) ]]__ /2/D/DG!0 0DN8,              
 ~!!(+++s    AAAcontextc                   |J |                                   |                                 5 }|                    d|f          }|'t          t          |d                   cddd           S 	 ddd           dS # 1 swxY w Y   dS )zGet the id for a context.N(select id from context where context = ?r   )_start_usingr   rd   r   rj   )r   r   r   rl   s       r*   _context_idzCoverageData._context_id  s    """]]__ 	//"LwjYYCCQ((	 	 	 	 	 	 	 	
 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   4A<.A<<B B 
str | Nonec                    | j                             d          r| j                             d|           || _        d| _        dS )zSet the current context for future :meth:`add_lines` etc.

        `context` is a str, the name of the context to use for the next data
        additions.  The context persists until the next :meth:`set_context`.

        .. versionadded:: 5.0

        dataopzSetting coverage context: N)r%   r&   r'   rN   rO   )r   r   s     r*   set_contextzCoverageData.set_context  sR     ;h'' 	HKF7FFGGG '#'   r/   c                    | j         pd}|                     |          }|	|| _        dS |                                 5 }|                    d|f          | _        ddd           dS # 1 swxY w Y   dS )z4Use the _current_context to set _current_context_id. Nz(insert into context (context) values (?))rN   r   rO   r   r   )r   r   
context_idr   s       r*   _set_context_idzCoverageData._set_context_id  s    '-2%%g..
!'1D$$$ C+.+@+@>J, ,(                 s   A((A,/A,c                    | j         S )zLThe base filename for storing data.

        .. versionadded:: 5.0

        )rA   r`   s    r*   base_filenamezCoverageData.base_filename       ~r/   c                    | j         S )zBWhere is the data stored?

        .. versionadded:: 5.0

        )rU   r`   s    r*   data_filenamezCoverageData.data_filename  r   r/   	line_data!Mapping[str, Collection[TLineNo]]c           	     
   | j                             d          r| j                             dt          |          t	          d |                                D                       fz             | j                             d          rGt          |                                          D ]%\  }}| j                             d| d|            &|                                  | 	                    d           |sd	S | 
                                5 }|                                  |                                D ]\  }}t          |          }|                     |d
          }d}|                    ||| j        f          5 }t!          |          }	d	d	d	           n# 1 swxY w Y   |	rt#          ||	d         d                   }|                    d|| j        |f           	 d	d	d	           d	S # 1 swxY w Y   d	S )zAdd measured line data.

        `line_data` is a dictionary mapping file names to iterables of ints::

            { filename: { line1, line2, ... }, ...}

        r   z&Adding lines: %d files, %d lines totalc              3  4   K   | ]}t          |          V  d S Nr   ).0liness     r*   	<genexpr>z)CoverageData.add_lines.<locals>.<genexpr>  s(      #O#O5CJJ#O#O#O#O#O#Or/   dataop2  : Tr   Nr   Bselect numbits from line_bits where file_id = ? and context_id = ?r   zQinsert or replace into line_bits  (file_id, context_id, numbits) values (?, ?, ?))r%   r&   r'   r   sumrX   sorteditemsr   _choose_lines_or_arcsr   r   r   r   rk   rO   r   r   rz   )
r   r   r   linenosr   	line_bitsrp   queryro   existings
             r*   	add_lineszCoverageData.add_lines  s    ;h'' 	BKFI#O#OI<L<L<N<N#O#O#O O OJ     {!!),, B)/	0A0A)B)B B B%HgK%%&@8&@&@w&@&@AAAA"""... 	F]]__ 	  """%.__%6%6  !'+G44	--d-;;\[[$2J(KLL )PS#CyyH) ) ) ) ) ) ) ) ) ) ) ) ) ) ) I -i!Q H HI  Gd6	B   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s8   A3G8F"G8"F&&G8)F&*A G88G<?G<arc_dataMapping[str, Collection[TArc]]c           	     <     j                             d          r j                             dt          |          t	          d |                                D                       fz              j                             d          rGt          |                                          D ]%\  }} j                             d| d|            &                                   	                    d           |sd	S  
                                5 }                                  |                                D ]D\  }}|s                     |d
           fd|D             }|                    d|           E	 d	d	d	           d	S # 1 swxY w Y   d	S )zAdd measured arc data.

        `arc_data` is a dictionary mapping file names to iterables of pairs of
        ints::

            { filename: { (l1,l2), (l1,l2), ... }, ...}

        r   z$Adding arcs: %d files, %d arcs totalc              3  4   K   | ]}t          |          V  d S r   r   )r   arcss     r*   r   z(CoverageData.add_arcs.<locals>.<genexpr>  s(      "K"K3t99"K"K"K"K"K"Kr/   r   r   r   Tr   Nr   c                ,    g | ]\  }}j         ||fS  )rO   )r   fromnotonorp   r   s      r*   
<listcomp>z)CoverageData.add_arcs.<locals>.<listcomp>  s*    ccclfVZ$":FDIcccr/   Qinsert or ignore into arc (file_id, context_id, fromno, tono) values (?, ?, ?, ?))r%   r&   r'   r   r   rX   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   rp   s   `     @r*   add_arcszCoverageData.add_arcs  s    ;h'' 	?KDHs"K"K9J9J"K"K"KKKH     {!!),, ?&,X^^-=-=&>&> ? ?NHdK%%&=8&=&=t&=&=>>>>"""--- 	F]]__ 	  """"*.."2"2 	 	$ --d-;;ccccc^bccc$$N   		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   A.FFFr   r   c           
     L   |s|sJ |r|rJ |rJ| j         rC| j                            d          r| j                            d           t	          d          |rJ| j        rC| j                            d          r| j                            d           t	          d          | j         sv| j        sq|| _        || _         |                                 5 }|                    ddt          t          |                    f           ddd           dS # 1 swxY w Y   dS dS dS )	z5Force the data file to choose between lines and arcs.r   z:Error: Can't add line measurements to existing branch dataz3Can't add line measurements to existing branch dataz:Error: Can't add branch measurements to existing line dataz3Can't add branch measurements to existing line datarw   has_arcsN)
rM   r%   r&   r'   r   rL   r   rz   rh   rj   )r   r   r   r   s       r*   r   z"CoverageData._choose_lines_or_arcs$  s   #d### 	ST^ 	S{!!(++ `!!"^___QRRR 	SDO 	S{!!(++ `!!"^___QRRR~ 	do 	#DO!DN C  KSYY0                   	 	 	 	s   3DDDfile_tracersMapping[str, str]c           	     6   | j                             d          r+| j                             dt          |          fz             |sdS |                                  |                                 5 }|                                D ]x\  }}|                     |d          }|                     |          }|r+||k    r$t          d
                    |||                    ^|r|                    d||f           y	 ddd           dS # 1 swxY w Y   dS )zdAdd per-file plugin information.

        `file_tracers` is { filename: plugin_name, ... }

        r   zAdding file tracers: %d filesNTr   3Conflicting file tracer name for '{}': {!r} vs {!r}z2insert into tracer (file_id, tracer) values (?, ?))r%   r&   r'   r   r   r   r   r   file_tracerr   rf   rz   )r   r   r   r   plugin_namerp   existing_plugins          r*   add_file_tracerszCoverageData.add_file_tracers9  s    ;h'' 	VK=\ARAR@TTUUU 	F]]__ 	)5););)=)=  %+--d-;;"&"2"28"<"<" &+55'QXX (/;    6 ! $$L +.  	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   2BDDDr   r   c                4    |                      |g|           dS )zEnsure that `filename` appears in the data, empty if needed.

        `plugin_name` is the name of the plugin responsible for this file.
        It is used to associate the right filereporter, etc.
        N)touch_files)r   r   r   s      r*   
touch_filezCoverageData.touch_fileV  s"     	([11111r/   	filenamesCollection[str]c                   | j                             d          r| j                             d|           |                                  |                                 5  | j        s| j        st          d          |D ]2}|                     |d           |r| 	                    ||i           3	 ddd           dS # 1 swxY w Y   dS )zEnsure that `filenames` appear in the data, empty if needed.

        `plugin_name` is the name of the plugin responsible for these files.
        It is used to associate the right filereporter, etc.
        r   z	Touching z*Can't touch files in an empty CoverageDataTr   N)
r%   r&   r'   r   r   rM   rL   r   r   r   )r   r   r   r   s       r*   r   zCoverageData.touch_files^  sG    ;h'' 	9K7)77888]]__ 	C 	C> N$/ N LMMM% C ChD111 C))8[*ABBB	C		C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	Cs    ACCCc                   | j                             d          r| j                             d|           |                                  |                                 5 }| j        rd}n| j        rd}nt          d          |D ]3}|                     |d          }||	                    ||f           4	 ddd           dS # 1 swxY w Y   dS )	zdPurge any existing coverage data for the given `filenames`.

        .. versionadded:: 7.2

        r   zPurging data for z%delete from line_bits where file_id=?zdelete from arc where file_id=?z*Can't purge files in an empty CoverageDataFr   N)
r%   r&   r'   r   r   rL   rM   r   r   rz   )r   r   r   sqlr   rp   s         r*   purge_fileszCoverageData.purge_filesq  s<    ;h'' 	AK?)??@@@]]__ 	2 N= N7 LMMM% 2 2--e-<<?  wj1111	2	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2s    ACCC
other_datamap_pathCallable[[str], str] | Nonec           	        | j                             d          r<| j                             d                    t	          |dd                               | j        r|j        rt          d          | j        r|j        rt          d          pd |                                  |	                                 |
                                5 }|                    d          5 }fd	|D             d
d
d
           n# 1 swxY w Y   |                    d          5 }d |D             }d
d
d
           n# 1 swxY w Y   |                    d          5 }fd|D             }d
d
d
           n# 1 swxY w Y   |                    d          5 }i }|D ]/\  }}	}
|         |	f}||v rt          ||         |
          }
|
||<   0	 d
d
d
           n# 1 swxY w Y   |                    d          5 }fd|D             }d
d
d
           n# 1 swxY w Y   d
d
d
           n# 1 swxY w Y   | 
                                5 }|j        J d|j        _        |                    d          5 }d |D             }d
d
d
           n# 1 swxY w Y   |                    d          5 }|                    fd|D                        d
d
d
           n# 1 swxY w Y   |                    dd                                 D                        |                    d          5 }d |D             d
d
d
           n# 1 swxY w Y   | j                                       |                    dd |D                        |                    d          5 }d |D             d
d
d
           n# 1 swxY w Y   i }                                D ]^}|                    |          }|                    |d          }|*||k    r$t          d                    |||                    |||<   _|r;|                     d            fd!|D             }|                    d"|           |r|                     d#           |                                D ]v\  \  }}	}
|                    d$|         |	         f          5 }t-          |          }d
d
d
           n# 1 swxY w Y   |r!t          |
|d%         d%                   |||	f<   w|                    d&fd'|                                D                        |                    d(fd)|                                D                        d
d
d
           n# 1 swxY w Y   | j        s*|                                  | 	                                 d
S d
S )*a  Update this data with data from another :class:`CoverageData`.

        If `map_path` is provided, it's a function that re-map paths to match
        the local machine's.  Note: `map_path` is None only when called
        directly from the test suite.

        r   zUpdating with data from {!r}rU   z???z6Can't combine branch coverage data with statement dataz6Can't combine statement coverage data with branch datac                    | S r   r   )ps    r*   <lambda>z%CoverageData.update.<locals>.<lambda>  s    ! r/   zselect path from filec                ,    i | ]\  }| |          S r   r   )r   r?   r   s     r*   
<dictcomp>z'CoverageData.update.<locals>.<dictcomp>  s%    AAA'4xx~~AAAr/   Nzselect context from contextc                    g | ]\  }|S r   r   r   r   s     r*   r   z'CoverageData.update.<locals>.<listcomp>  s    :::
G:::r/   zselect file.path, context.context, arc.fromno, arc.tono from arc inner join file on file.id = arc.file_id inner join context on context.id = arc.context_idc                2    g | ]\  }}}}|         |||fS r   r   )r   r?   r   r   r   filess        r*   r   z'CoverageData.update.<locals>.<listcomp>  s>       5w 4['648  r/   zselect file.path, context.context, line_bits.numbits from line_bits inner join file on file.id = line_bits.file_id inner join context on context.id = line_bits.context_idzPselect file.path, tracer from tracer inner join file on file.id = tracer.file_idc                (    i | ]\  }}|         |S r   r   )r   r?   tracerr   s      r*   r   z'CoverageData.update.<locals>.<dictcomp>  s#    III>D&5;IIIr/   	IMMEDIATEc                    i | ]\  }|d S r   r   )r   r?   s     r*   r   z'CoverageData.update.<locals>.<dictcomp>  s    :::UTb:::r/   c                .    i | ]\  }} |          |S r   r   )r   r?   r   r   s      r*   r   z'CoverageData.update.<locals>.<dictcomp>  s7     % % %$f HTNNF% % %r/   z,insert or ignore into file (path) values (?)c              3     K   | ]}|fV  d S r   r   )r   files     r*   r   z&CoverageData.update.<locals>.<genexpr>  s$      44T$444444r/   rc   c                    i | ]\  }}||	S r   r   )r   idr?   s      r*   r   z'CoverageData.update.<locals>.<dictcomp>  s    999TD"999r/   z2insert or ignore into context (context) values (?)c              3     K   | ]}|fV  d S r   r   r   s     r*   r   z&CoverageData.update.<locals>.<genexpr>  s$      44'444444r/   zselect id, context from contextc                    i | ]\  }}||	S r   r   )r   r  r   s      r*   r   z'CoverageData.update.<locals>.<dictcomp>  s    BBB{r7wBBBr/   r   r   Tr   c              3  F   K   | ]\  }}}}|         |         ||fV  d S r   r   )r   r  r   r   r   context_idsfile_idss        r*   r   z&CoverageData.update.<locals>.<genexpr>	  sQ        3gvt d^[%964H     r/   r   r   r   r   zPinsert or replace into line_bits (file_id, context_id, numbits) values (?, ?, ?)c                >    g | ]\  \  }}}|         |         |fS r   r   )r   r  r   numbitsr  r  s       r*   r   z'CoverageData.update.<locals>.<listcomp>$  sA       4OT7W "$W)=wG  r/   z<insert or ignore into tracer (file_id, tracer) values (?, ?)c              3  2   K   | ]\  }}|         |fV  d S r   r   )r   r   r   r  s      r*   r   z&CoverageData.update.<locals>.<genexpr>,  s2      YY2B(F(8$f-YYYYYYr/   )r%   r&   r'   rf   r|   rL   rM   r   r   readr   rk   r   r   isolation_levelupdater   rX   rE   r   r   r   r   r=   r[   )r   r   r   r   ro   contextsr   r   r?   r   r
  keytracersthis_tracers
tracer_mapthis_tracerother_tracerarc_rowsr  r   r  r  r   s     `                 @@@r*   r  zCoverageData.update  s<
    ;h'' 	K<CC
K77     ? 	Vz3 	VTUUU> 	Vj3 	VTUUU, 	 	  "" )	Jc455 BAAAASAAAB B B B B B B B B B B B B B B :;; ;s::c:::; ; ; ; ; ; ; ; ; ; ; ; ; ; ; D  	
    9<  	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 J  )
 68.1 ) )*D'7 ;0Ce||"/c
G"D"D!(E#JJ	)) ) ) ) ) ) ) ) ) ) ) ) ) ) ) >  J IIIISIIIJ J J J J J J J J J J J J J JI)	J )	J )	J )	J )	J )	J )	J )	J )	J )	J )	J )	J )	J )	J )	JV ]]__ ]	7&&&&1CG# 455 ;::c:::; ; ; ; ; ; ; ; ; ; ; ; ; ; ;>   ## % % % %(+% % %   	                 >44U\\^^444   899 :S99S999: : : : : : : : : : : : : : :N!!(+++  D448444   >?? C3BBcBBBC C C C C C C C C C C C C C C J 
0 
0*..t44&{{444*{l/J/J#MTT +|   
 $0
4    ***555    7;   $$N    ***66605 X X,OT7W\!$W)=>  - #'99	- - - - - - - - - - - - - - -
   X1>wQRTU1W1WtWo.$$F    8=       NYYYYjFVFVFXFXYYY  u]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	 ]	~ } 	KKMMMIIKKKKK	 	s  H/,D;H/D	H/D	H/'E 4H/ E	H/E	H/ E;/H/;E?	?H/E?	H/5GH/G!	!H/$G!	%H/=HH/H	H/H	 H//H36H3+V9JVJ	VJ	V2"K V K$	$V'K$	(A
V2M?VM	VM	AV%N>2V>O	VO	DVS/#V/S33V6S37BVVVparallelc                   |                                   | j        rdS | j                            d          r"| j                            d| j                   t          | j                   |rt          j        	                    | j                  \  }}t          j        
                    t          j                            |          |          }t          j        |          dz   }t          j        |          D ]J}| j                            d          r| j                            d|           t          |           IdS dS )zErase the data in this object.

        If `parallel` is true, then also deletes data files created from the
        basename by parallel-mode.

        Nr]   zErasing data file z.*zErasing parallel data file )r[   r=   r%   r&   r'   rU   r   r>   r?   splitjoinr@   globescape)r   r  data_dirlocallocal_abs_pathpatternr   s          r*   erasezCoverageData.erase4  s8    	= 	F;h'' 	GKE4>EEFFFT^$$$ 	' gmmDN;;OHeW\\"'//(*C*CUKKNk.11D8G Ig.. ' ';%%h// RK%%&PH&P&PQQQX&&&&	' 	'' 'r/   c                    t           j                            | j                  r6|                                 5  d| _        ddd           dS # 1 swxY w Y   dS dS )z"Start using an existing data file.TN)r>   r?   r   rU   r   rK   r`   s    r*   r  zCoverageData.readJ  s    7>>$.)) 	' ' '"&' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '	' 	's   AAAc                    dS )z,Ensure the data is written to the data file.Nr   r`   s    r*   r'   zCoverageData.writeP  s    r/   c                   | j         t          j                    k    r@|                                  |                                  t          j                    | _         | j        s|                                  d| _        dS )z+Call this before using the database at all.TN)rH   r>   rG   r[   rD   rK   r!  r`   s    r*   r   zCoverageData._start_usingT  sc    9	##KKMMM!!###	DI 	JJLLLr/   c                *    t          | j                  S )z4Does the database have arcs (True) or lines (False).)r6   rM   r`   s    r*   r   zCoverageData.has_arcs_  s    DN###r/   set[str]c                *    t          | j                  S )zA set of all files that have been measured.

        Note that a file may be mentioned as measured even though no lines or
        arcs for that file are present in the data.

        )setrE   r`   s    r*   measured_fileszCoverageData.measured_filesc  s     4>"""r/   c                    |                                   |                                 5 }|                    d          5 }d |D             }ddd           n# 1 swxY w Y   ddd           n# 1 swxY w Y   |S )zWA set of all contexts that have been measured.

        .. versionadded:: 5.0

        z%select distinct(context) from contextc                    h | ]
}|d          S r   r   r   rl   s     r*   	<setcomp>z1CoverageData.measured_contexts.<locals>.<setcomp>u  s    222sCF222r/   N)r   r   rk   )r   r   ro   r  s       r*   measured_contextszCoverageData.measured_contextsl  s     	]]__ 	3DEE 322c2223 3 3 3 3 3 3 3 3 3 3 3 3 3 3	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 s4   A/AA/A	A/A	 A//A36A3c                2   |                                   |                                 5 }|                     |          }|	 ddd           dS |                    d|f          }||d         pdcddd           S 	 ddd           dS # 1 swxY w Y   dS )a  Get the plugin name of the file tracer for a file.

        Returns the name of the plugin that handles this file.  If the file was
        measured, but didn't use a plugin, then "" is returned.  If the file
        was not measured, then None is returned.

        Nz+select tracer from tracer where file_id = ?r   r   )r   r   r   rd   )r   r   r   rp   rl   s        r*   r   zCoverageData.file_tracerx  s    	]]__ 	mmH--G	 	 	 	 	 	 	 	 //"ORYQ[\\C1v|	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   B"B>BBBc                ,   |                                   |                                 5 }|                    d|f          5 }d |                                D             | _        ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )ad  Set a context for subsequent querying.

        The next :meth:`lines`, :meth:`arcs`, or :meth:`contexts_by_lineno`
        calls will be limited to only one context.  `context` is a string which
        must match a context exactly.  If it does not, no exception is raised,
        but queries will return no data.

        .. versionadded:: 5.0

        r   c                    g | ]
}|d          S r,  r   r-  s     r*   r   z2CoverageData.set_query_context.<locals>.<listcomp>  s    *L*L*Lc3q6*L*L*Lr/   N)r   r   rk   fetchallrP   )r   r   r   ro   s       r*   set_query_contextzCoverageData.set_query_context  s0    	]]__ 	MG'TT MX[*L*LS\\^^*L*L*L'M M M M M M M M M M M M M M M	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	Ms5   B	$A1%B	1A5	5B	8A5	9B		BBr  Sequence[str] | Nonec                   |                                   |r|                                 5 }d                    dgt          |          z            }|                    d|z   |          5 }d |                                D             | _        ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS d| _        dS )a  Set a number of contexts for subsequent querying.

        The next :meth:`lines`, :meth:`arcs`, or :meth:`contexts_by_lineno`
        calls will be limited to the specified contexts.  `contexts` is a list
        of Python regular expressions.  Contexts will be matched using
        :func:`re.search <python:re.search>`.  Data will be included in query
        results if they are part of any of the contexts matched.

        .. versionadded:: 5.0

        z or zcontext regexp ?zselect id from context where c                    g | ]
}|d          S r,  r   r-  s     r*   r   z3CoverageData.set_query_contexts.<locals>.<listcomp>  s    .P.P.P#s1v.P.P.Pr/   N)r   r   r  r   rk   r3  rP   )r   r  r   context_clausero   s        r*   set_query_contextszCoverageData.set_query_contexts  sl    	 	+ QC!'.@-ACMM-Q!R!R[[!@>!QS[\\ Q`c.P.P.P.P.PD+Q Q Q Q Q Q Q Q Q Q Q Q Q Q QQ Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q
 '+D###s6   A B3+$BB3B	B3"B	#B33B7:B7list[TLineNo] | Nonec                :   |                                   |                                 rO|                     |          }|8t          j                            |          }t          d |D                       S |                                 5 }|                     |          }|	 ddd           dS d}|g}| j	        ?d
                    dt          | j	                  z            }|d|z   dz   z  }|| j	        z  }|                    ||          5 }	t          |	          }
ddd           n# 1 swxY w Y   t                      }|
D ]*}|                    t          |d                              +t          |          cddd           S # 1 swxY w Y   dS )	aj  Get the list of lines executed for a source file.

        If the file was not measured, returns None.  A file might be measured,
        and have no lines executed, in which case an empty list is returned.

        If the file was executed, returns a list of integers, the line numbers
        executed in the file. The list is in no particular order.

        Nc                    h | ]
}|d k    |S r,  r   )r   ls     r*   r.  z%CoverageData.lines.<locals>.<setcomp>  s    ;;;1QUUQUUUr/   z/select numbits from line_bits where file_id = ?, ? and context_id in ()r   )r   r   r   	itertoolschainfrom_iterabler   r   r   rP   r  r   rk   r(  r  r   )r   r   r   	all_linesr   rp   r   r   	ids_arrayro   bitmapsnumsrl   s                r*   r   zCoverageData.lines  s-    	==?? 	=99X&&D%O99$??	;;	;;;<<<]]__ 	"mmH--G	" 	" 	" 	" 	" 	" 	" 	"
 Jy*6 $		#D4K0L0L*L M MI3i?#EEED33D[[-- ("3iiG( ( ( ( ( ( ( ( ( ( ( ( ( ( (uu" 9 9CKKA 7 78888Dzz!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"s>   F2A!FD/#F/D3	3F6D3	7AFFFlist[TArc] | Nonec                   |                                   |                                 5 }|                     |          }|	 ddd           dS d}|g}| j        ?d                    dt          | j                  z            }|d|z   dz   z  }|| j        z  }|                    ||          5 }t          |          cddd           cddd           S # 1 swxY w Y   	 ddd           dS # 1 swxY w Y   dS )a  Get the list of arcs executed for a file.

        If the file was not measured, returns None.  A file might be measured,
        and have no arcs executed, in which case an empty list is returned.

        If the file was executed, returns a list of 2-tuples of integers. Each
        pair is a starting line number and an ending line number for a
        transition from one line to another. The list is in no particular
        order.

        Negative numbers have special meaning.  If the starting line number is
        -N, it represents an entry to the code object that starts at line N.
        If the ending ling number is -N, it's an exit from the code object that
        starts at line N.

        Nz7select distinct fromno, tono from arc where file_id = ?r>  r?  r@  rA  )r   r   r   rP   r  r   rk   r   )r   r   r   rp   r   r   rF  ro   s           r*   r   zCoverageData.arcs  s   " 	]]__ 	%mmH--G	% 	% 	% 	% 	% 	% 	% 	%
 Ry*6 $		#D4K0L0L*L M MI3i?#EEED33D[[-- %99% % % % % % %	% 	% 	% 	% 	% 	% 	% 	%% % % % % % % % %	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%s<   C1A!C10C?C1C	C1C	 C11C58C5dict[TLineNo, list[str]]c                L   |                                   |                                 5 }|                     |          }|i cddd           S t          j        t
                    }|                                 rd}|g}| j        ?d                    dt          | j                  z            }|d|z   dz   z  }|| j        z  }|
                    ||          5 }|D ]H\  }	}
}|	dk    r||	                             |           |
dk    r||
                             |           I	 ddd           n# 1 swxY w Y   nd}|g}| j        ?d                    dt          | j                  z            }|d	|z   dz   z  }|| j        z  }|
                    ||          5 }|D ]2\  }}t          |          D ]}||                             |           3	 ddd           n# 1 swxY w Y   ddd           n# 1 swxY w Y   d
 |                                D             S )zGet the contexts for each line in a file.

        Returns:
            A dict mapping line numbers to a list of context names.

        .. versionadded:: 5.0

        Nztselect arc.fromno, arc.tono, context.context from arc, context where arc.file_id = ? and arc.context_id = context.idr>  r?  z and arc.context_id in (rA  r   zaselect l.numbits, c.context from line_bits l, context c where l.context_id = c.id and file_id = ?z and l.context_id in (c                4    i | ]\  }}|t          |          S r   )r   )r   linenor  s      r*   r   z3CoverageData.contexts_by_lineno.<locals>.<dictcomp>#  s%    [[[+;68X[[[r/   )r   r   r   collectionsdefaultdictr(  r   rP   r  r   rk   r   r   r   )r   r   r   rp   lineno_contexts_mapr   r   rF  ro   r   r   r   r
  rN  s                 r*   contexts_by_linenozCoverageData.contexts_by_lineno  s    	]]__ %	EmmH--G%	E %	E %	E %	E %	E %	E %	E %	E
 #."9#">">}} EL 
  y*6 $		#D4K0L0L*L M MI7)CcIIED33D[[-- C14 C C-g!A::/7;;GDDD!88/599'BBB	CC C C C C C C C C C C C C C C& 
  y*6 $		#D4K0L0L*L M MI5	ACGGED33D[[-- E,/ E E(&5g&>&> E EF/7;;GDDDDEEE E E E E E E E E E E E E E EE%	E %	E %	E %	E %	E %	E %	E %	E %	E %	E %	E %	E %	E %	E %	EN \[?R?X?X?Z?Z[[[[sb   G=BG=AD6*G=6D:	:G==D:	>A%G=#6G&G=&G*	*G=-G*	.G==HHlist[tuple[str, Any]]c                   t          dt                                5 }|                    d          5 }d |D             }ddd           n# 1 swxY w Y   |                    d          5 }d |D             }ddd           n# 1 swxY w Y   t          j        d                    |          d	
          }ddd           n# 1 swxY w Y   dt          j        fd|fd|fgS )zaOur information for `Coverage.sys_info`.

        Returns a list of (key, value) pairs.

        rS   )r9   zpragma temp_storec                    g | ]
}|d          S r,  r   r-  s     r*   r   z)CoverageData.sys_info.<locals>.<listcomp>.  s    444c!f444r/   Nzpragma compile_optionsc                    g | ]
}|d          S r,  r   r-  s     r*   r   z)CoverageData.sys_info.<locals>.<listcomp>0  s    ///CQ///r/   r>  K   )widthsqlite3_sqlite_versionsqlite3_temp_storesqlite3_compile_options)r   r
   rk   textwrapwrapr  sqlite3sqlite_version)clsrZ   ro   
temp_storecoptss        r*   sys_infozCoverageData.sys_info%  s    j666 	>"/00 5C44444
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5455 0//3///0 0 0 0 0 0 0 0 0 0 0 0 0 0 0M$))E"2"2"===E	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> &w'=>!:.&.
 	
sX   CACA	CA	C-B:CB
	
CB
	,CC
C
)NNFNN)r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r   r;   )r   r;   )rZ   r   r   r;   )r   r   )r   r6   )r   r   )r   r   r   r;   )F)r   rh   r   r6   r   r   )r   rh   r   r   )r   r   r   r;   )r   rh   )r   r   r   r;   )r   r   r   r;   )FF)r   r6   r   r6   r   r;   )r   r   r   r;   r   )r   rh   r   rh   r   r;   r   )r   r   r   r   r   r;   )r   r   r   r;   )r   r    r   r   r   r;   )r  r6   r   r;   )r   r&  )r   rh   r   r   )r   rh   r   r;   )r  r5  r   r;   )r   rh   r   r:  )r   rh   r   rI  )r   rh   r   rK  )r   rS  ).r)   
__module____qualname____doc__rQ   r   __repr__rD   r[   ra   r_   ri   r   r   r   r   r   r   r.   r   r   r   r   r   r   r   r   r   r   r   r  r!  r  r'   r   r   r)  r/  r   r4  r9  r   r   rR  classmethodrc  r   r/   r*   r    r       s       R Rl %)$(#"&-9 -9 -9 -9 -9^ H/ / / /( ( ( (   3 3 3 3B` ` ` `&0 0 0 0   @ @ @ @.   8, , , , ,	 	 	 	 ( ( ( W(          " " " W"H    WB    *    W82 2 2 2 2C C C C C&2 2 2 26 15i i i i iV' ' ' ' ',' ' ' '   	 	 	 	$ $ $ $# # # #
 
 
 
   $M M M M + + + +*!" !" !" !"F% % % %@1\ 1\ 1\ 1\f 
 
 
 [
 
 
r/   r    r3   r4   r   c                V   | du rt          j        t          j        d                    t          j        t          j        z   d                    fdt          d          D                       }t          j
                     dt          j                     d| d} n| d	u rd
} | S )zCompute a filename suffix for a data file.

    If `suffix` is a string or None, simply return it. If `suffix` is True,
    then build a suffix incorporating the hostname, process id, and a random
    number.

    Returns a string or None.

    T   r   c              3  B   K   | ]}                               V  d S r   )choice)r   _dieletterss     r*   r   z"filename_suffix.<locals>.<genexpr>K  s/      >>

7++>>>>>>r/      rT   z.XxFN)randomRandomr>   urandomstringascii_uppercaseascii_lowercaser  rangesocketgethostnamerG   )r3   rollsrn  ro  s     @@r*   rV   rV   :  s     ~~
 mBJqMM**(6+AA>>>>>U1XX>>>>>&((BB29;;BB%BBB	5Mr/   )r   r   r   r   )r3   r4   r   r   )6rf  
__future__r   rO  r~   r,   r  rB  r>   rr  ry  r^  ru  r}   r\  rI   r   typingr   r   r   collections.abcr   r   r	   coverage.debugr
   r   coverage.exceptionsr   r   coverage.miscr   r   coverage.numbitsr   r   r   coverage.sqlitedbr   coverage.typesr   r   r   r   r   r   coverage.versionr   re   ry   r.   r    rV   r   r/   r*   <module>r     s6     " " " " " "               				     



                : 9 9 9 9 9 9 9 9 9 1 1 1 1 1 1 1 1 < < < < < < < < 6 6 6 6 6 6 6 6 L L L L L L L L L L & & & & & & S S S S S S S S S S S S S S S S ( ( ( ( ( (^B
 <
|
 
 
 
x
 x
 x
 x
 x
 x
 x
 x
v     r/   