  Recently there has been a significant effort to handle quantitative
properties in formal verification and synthesis. While weighted automata over
finite and infinite words provide a natural and flexible framework to express
quantitative properties, perhaps surprisingly, some basic system properties
such as average response time cannot be expressed using weighted automata, nor
in any other know decidable formalism. In this work, we introduce nested
weighted automata as a natural extension of weighted automata which makes it
possible to express important quantitative properties such as average response
time. In nested weighted automata, a master automaton spins off and collects
results from weighted slave automata, each of which computes a quantity along a
finite portion of an infinite word. Nested weighted automata can be viewed as
the quantitative analogue of monitor automata, which are used in run-time
verification. We establish an almost complete decidability picture for the
basic decision problems about nested weighted automata, and illustrate their
applicability in several domains. In particular, nested weighted automata can
be used to decide average response time properties.
