2,465 research outputs found
Inferring an Indeterminate String from a Prefix Graph
An \itbf{indeterminate string} (or, more simply, just a \itbf{string}) \s{x}
= \s{x}[1..n] on an alphabet is a sequence of nonempty subsets of
. We say that \s{x}[i_1] and \s{x}[i_2] \itbf{match} (written
\s{x}[i_1] \match \s{x}[i_2]) if and only if \s{x}[i_1] \cap \s{x}[i_2] \ne
\emptyset. A \itbf{feasible array} is an array \s{y} = \s{y}[1..n] of
integers such that \s{y}[1] = n and for every , \s{y}[i] \in
0..n\- i\+ 1. A \itbf{prefix table} of a string \s{x} is an array \s{\pi} =
\s{\pi}[1..n] of integers such that, for every , \s{\pi}[i] = j
if and only if \s{x}[i..i\+ j\- 1] is the longest substring at position
of \s{x} that matches a prefix of \s{x}. It is known from \cite{CRSW13} that
every feasible array is a prefix table of some indetermintate string. A
\itbf{prefix graph} \mathcal{P} = \mathcal{P}_{\s{y}} is a labelled simple
graph whose structure is determined by a feasible array \s{y}. In this paper we
show, given a feasible array \s{y}, how to use \mathcal{P}_{\s{y}} to
construct a lexicographically least indeterminate string on a minimum alphabet
whose prefix table \s{\pi} = \s{y}.Comment: 13 pages, 1 figur
Computing Covers Using Prefix Tables
An \emph{indeterminate string} on an alphabet is a
sequence of nonempty subsets of ; is said to be \emph{regular} if
every subset is of size one. A proper substring of regular is said to
be a \emph{cover} of iff for every , an occurrence of in
includes . The \emph{cover array} of is
an integer array such that is the longest cover of .
Fifteen years ago a complex, though nevertheless linear-time, algorithm was
proposed to compute the cover array of regular based on prior computation
of the border array of . In this paper we first describe a linear-time
algorithm to compute the cover array of regular string based on the prefix
table of . We then extend this result to indeterminate strings.Comment: 14 pages, 1 figur
Static analysis of energy consumption for LLVM IR programs
Energy models can be constructed by characterizing the energy consumed by
executing each instruction in a processor's instruction set. This can be used
to determine how much energy is required to execute a sequence of assembly
instructions, without the need to instrument or measure hardware.
However, statically analyzing low-level program structures is hard, and the
gap between the high-level program structure and the low-level energy models
needs to be bridged. We have developed techniques for performing a static
analysis on the intermediate compiler representations of a program.
Specifically, we target LLVM IR, a representation used by modern compilers,
including Clang. Using these techniques we can automatically infer an estimate
of the energy consumed when running a function under different platforms, using
different compilers.
One of the challenges in doing so is that of determining an energy cost of
executing LLVM IR program segments, for which we have developed two different
approaches. When this information is used in conjunction with our analysis, we
are able to infer energy formulae that characterize the energy consumption for
a particular program. This approach can be applied to any languages targeting
the LLVM toolchain, including C and XC or architectures such as ARM Cortex-M or
XMOS xCORE, with a focus towards embedded platforms. Our techniques are
validated on these platforms by comparing the static analysis results to the
physical measurements taken from the hardware. Static energy consumption
estimation enables energy-aware software development, without requiring
hardware knowledge
- …