Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2020 Jun 16;12225:541–563. doi: 10.1007/978-3-030-53291-8_28

Good-Enough Synthesis

Shaull Almagor 10,, Orna Kupferman 11
Editors: Shuvendu K Lahiri8, Chao Wang9
PMCID: PMC7363190

Abstract

We introduce and study good-enough synthesis (ge-synthesis) – a variant of synthesis in which the system is required to satisfy a given specification Inline graphic only when it interacts with an environments for which a satisfying interaction exists. Formally, an input sequence x is hopeful if there exists some output sequence y such that the induced computation Inline graphic satisfies Inline graphic, and a system ge-realizes Inline graphic if it generates a computation that satisfies Inline graphic on all hopeful input sequences. ge-synthesis is particularly relevant when the notion of correctness is multi-valued (rather than Boolean), and thus we seek systems of the highest possible quality, and when synthesizing autonomous systems, which interact with unexpected environments and are often only expected to do their best.

We study ge-synthesis in Boolean and multi-valued settings. In both, we suggest and solve various definitions of ge-synthesis, corresponding to different ways a designer may want to take hopefulness into account. We show that in all variants, ge-synthesis is not computationally harder than traditional synthesis, and can be implemented on top of existing tools. Our algorithms are based on careful combinations of nondeterministic and universal automata. We augment systems that ge-realize their specifications by monitors that provide satisfaction information. In the multi-valued setting, we provide both a worst-case analysis and an expectation-based one, the latter corresponding to an interaction with a stochastic environment.

Introduction

Synthesis is the automated construction of a system from its specification: given a specification Inline graphic, typically by a linear temporal logic (LTL) formula over sets I and O of input and output signals, the goal is to construct a finite-state system that satisfies Inline graphic [9, 20]. At each moment in time, the system reads an assignment, generated by the environment, to the signals in I, and responds with an assignment to the signals in O. Thus, with every input sequence, the system associates an output sequence. The system realizes Inline graphic if Inline graphic is satisfied in all the interactions of the system, with all environments  [5].

In practice, the requirement to satisfy the specification in all environments is often too strong. Accordingly, it is common to add assumptions on the behavior of the environment. An assumption may be direct, say given by an LTL formula that restricts the set of possible input sequences [8], less direct, say a bound on the size of the environment [13] or other resources it uses, or conceptual, say rationality from the side of the environment, which may have its own objectives [11, 14]. We introduce and study a new type of relaxation of the requirement to satisfy the specification in all environments. The idea behind the relaxation is that if an environment is such that no system can interact with it in a way that satisfies the specification, then we cannot expect our system to succeed. In other words, the system has to satisfy the specification only when it interacts with environments in which this mission is possible. This is particularly relevant when synthesizing autonomous systems, which interact with unexpected environments and often replace human behavior, which is only expected to be good enough [28], and when the notion of correctness is multi-valued (rather than Boolean), and thus we seek high-quality systems.

Before we explain the relaxation formally, let us consider a simple example, and we start with the Boolean setting. Let Inline graphic and Inline graphic. Thus, the system receives requests and generates grants. Consider the specification Inline graphic. Clearly, Inline graphic is not realizable, as an input sequence need not satisfy Inline graphic or Inline graphic. However, a system that always generates a grant upon (and only upon) a request, ge -realizes Inline graphic, in the sense that for every input sequence, if there is some interaction with it with which Inline graphic is satisfied, then our system generates such an interaction.

Formally, we model a system by a strategy Inline graphic, which given an input sequence Inline graphic, generates an output sequence Inline graphic, inducing the computation Inline graphic, obtained by “merging” x and f(x). In traditional realizability, a system realizes Inline graphic if Inline graphic is satisfied in all environments. Formally, for all input sequences Inline graphic, the computation Inline graphic satisfies Inline graphic. For our new notion, we first define when an input sequence Inline graphic is hopeful, namely there is an output sequence Inline graphic such that the computation Inline graphic satisfies Inline graphic. Then, a system ge -realizes Inline graphic if Inline graphic is satisfied in all interactions with hopeful input sequences. Formally, for all Inline graphic, if x is hopeful, then the computation Inline graphic satisfies Inline graphic.

Since LTL is Boolean, synthesized systems are correct, but there is no reference to their quality. This is a crucial drawback, as designers would be willing to give up manual design only if automated-synthesis algorithms return systems of comparable quality. Addressing this challenge, researchers have developed quantitative specification formalisms. For example, in [4], the input to the synthesis problem includes also Mealy machines that grade different realizing systems. In  [1], the specification formalism is the multi-valued logic Inline graphic, which augments Inline graphic with quality operators. The satisfaction value of an Inline graphic formula is a real value in [0, 1], where the higher the value, the higher the quality in which the computation satisfies the specification. The quality operators in Inline graphic can prioritize and weight different scenarios. The synthesis algorithm for Inline graphic seeks systems with a highest possible satisfaction value. One can consider either a worst-case approach, where the satisfaction value of a system is the satisfaction value of its computation with the lowest satisfaction value [1], or a stochastic approach, where it is the expected satisfaction value, given a distribution of the inputs [2].

Consider, for example, an acceleration controller of an autonomous car. Normally, the car should maintain a relatively constant speed. However, in order to optimize travel time, if a long stretch of road is visible and is identified as low-risk, the car should accelerate. Conversely, if an obstacle or some risk factor is identified, the car should decelerate. Clearly, the car cannot accelerate and decelerate at the same time. We capture this desired behavior with the following Inline graphic formula over the inputs Inline graphic and outputs Inline graphic:

graphic file with name M44.gif

Thus, in order to get satisfaction value 1, each detection of a safe stretch should be followed by an acceleration during two transactions, with a preference to the first (by the semantics of the weighted average Inline graphic operator, the satisfaction value of Inline graphic is 1 when Inline graphic is followed by two Inline graphics, Inline graphic when it is followed by one Inline graphic, and Inline graphic if it is followed by one Inline graphic with a delay), and each detection of an obstacle should be followed by a deceleration during two transactions, with a (higher) preference to the first. Clearly, Inline graphic is not realizable with satisfaction value 1, as for some input sequences, namely those with simultaneous or successive occurrences of safe and obs, it is impossible to respond with the desired patterns of acceleration or declaration. Existing frameworks for synthesis cannot handle this challenge. Indeed, we do not want to add an assumption about safe and obs occurring far apart. Rather, we want our autonomous car to behave in an optimal way also in problematic environments, and we want, when we evaluate the quality of a car, to take into an account the challenge posed by the environment. This is exactly what high-quality ge-synthesis does: for each input sequence, it requires the synthesized car to obtain the maximal satisfaction value that is possible for that input sequence.

We show that in the Boolean setting, ge-synthesis can be reduced to synthesis of LTL with quantification of atomic propositions [26]. Essentially, ge-synthesis of Inline graphic amounts to synthesis of Inline graphic. We show that by carefully switching between nondeterminisitc and universal automata, we can solve the ge-synthesis problem in doubly-exponential time, thus it is not harder than traditional synthesis. Also, our algorithm is Safraless, thus no determinization and parity games are needed [15, 17].

A drawback of ge-synthesis is that we do not actually know whether the specification is satisfied. We describe two ways to address this drawback. The first goes beyond providing satisfaction information and enables the designer to partition the specification into a strong component, which is guaranteed to be satisfied in all environments, and a weak component, which is guaranteed to be satisfied only in hopeful ones. The second way augments ge-realizing systems by “satisfaction indicators”. For example, we show that when a system is lucky to interact with an environment that generates a prefix of an input sequence such that, when combined with a suitable prefix of an output sequence, the specification becomes realizable, then ge-synthesis guarantees that the system indeed responds with a suitable prefix of an output sequence. Moreover, it is easy to add to the system a monitor that detects such prefixes, thus indicating that the specification is going to be satisfied in all environments. Additional monitors we suggest detect prefixes after which the satisfaction becomes valid or unsatisfiable.

We continue to the quantitative setting. We parameterize hope by a satisfaction value Inline graphic and say that an input sequence Inline graphic is v-hopeful for an Inline graphic formula Inline graphic if an interaction with it can generate a computation that satisfies Inline graphic with value at least v. Formally, there is an output sequence Inline graphic such that Inline graphic, where for a computation Inline graphic, we use Inline graphic to denotes the satisfaction value of Inline graphic in w. As we elaborate below, while the basic idea of ge-synthesis, namely “input sequences with a potential to high quality should realize this potential” is as in the Boolean setting, there are several ways to implement this idea.

We start with a worst-case approach. There, a strategy Inline graphic ge-realizes an Inline graphic formula Inline graphic if for all input sequences Inline graphic, if x is v-hopeful, then Inline graphic. The requirement can be applied to a threshold value or to all values Inline graphic. For example, our autonomous car controller has to achieve satisfaction value 1 in roads with no simultaneous or successive occurrences of safe and obs, and value Inline graphic in roads that violate the latter only with some obs followed by safe. We then argue that the situation is similar to that of high-quality assume guarantee synthesis [3], where richer relations between a quantitative assumption and a quantitative guarantee are of interest. In our case, the assumption is the hopefulness level of the input sequence, namely Inline graphic, and the guarantee is the satisfaction value of the specification in the generated computation, namely Inline graphic. When synthesizing, for example, a robot controller (e.g., vacuum cleaner) in a building, the doors to rooms are controlled by the environment, whereas the movement of the robot by the system. A measure of the performance of the robot has to take into an account both the number of “hopeful rooms”, namely these with an open door – a projection of this number on [0, 1] serves as the assumption, and the number of room cleaned – which induces the guarantee. We assume that the desired relation between the assumption and the guarantee is given by a function Inline graphic, which can capture implication, difference, or ratio.

We continue with an analysis of the expected performance of the system. We do so by assuming a stochastic environment, with a known distribution on the input sequences. We introduce and study two measures for high-quality ge-synthesis in a stochastic environment. In the first, termed expected ge -synthesis, all input sequences are sampled, yet the satisfaction value in each input sequence takes its hopefulness level into account, for example by a Inline graphic function as in the assume-guarantee setting. In the second, termed conditional expected ge -synthesis, only hopeful input sequences are sampled. For both approaches, our synthesis algorithm is based on the high-quality Inline graphic synthesis algorithm of [2], which is based on an analysis of deterministic automata associated with the different satisfaction values of the Inline graphic specification. Here too, the complexity stays doubly exponential. In addition, we extend the synthesized systems with guarantees for satisfaction and monitors indicating satisfaction in various satisfaction levels.

Preliminaries

Consider two finite sets I and O of input and output signals, respectively. For two words Inline graphic and Inline graphic, we define Inline graphic as the word in Inline graphic obtained by merging x and y. Thus, Inline graphic. The definition is similar for finite x and y of the same length. For a word Inline graphic, we use Inline graphic to denote the projection of w on I. In particular, Inline graphic.

A strategy is a function Inline graphic. Intuitively, f models the interaction of a system that generates in each moment in time a letter in Inline graphic with an environment that generates letters in Inline graphic. For an input sequence Inline graphic, we use f(x) to denote the output sequence Inline graphic. Then, Inline graphic is the computation of f on x. Note that the environment initiates the interaction, by inputting Inline graphic. Of special interest are finite-state strategies, induced by finite state transducers. Formally, an I/O-transducer is Inline graphic, where S is a finite set of states, Inline graphic is an initial state, Inline graphic is a transition function, and Inline graphic is a labelling function. For Inline graphic, let Inline graphic be the state in S that Inline graphic reaches after reading x. Thus is, Inline graphic and for every Inline graphic, we have that Inline graphic. Then, Inline graphic induces the strategy Inline graphic, where for every Inline graphic, we have that Inline graphic. We use Inline graphic and Inline graphic to denote the output sequence and the computation of Inline graphic on x, respectively, and talk about Inline graphic realizing a specification, referring to the strategy Inline graphic.

We specify on-going behaviors of reactive systems using the linear temporal logic LTL [19]. Formulas of LTL are constructed from a set AP of atomic proposition using the usual Boolean operators and temporal operators like Inline graphic (“always”), Inline graphic (“eventually”), Inline graphic (“next time”), and Inline graphic (“until”). Each LTL formula Inline graphic defines a language Inline graphic. We also use automata on infinite words for specifying and reasoning about on-going behaviors. We use automata with different branching modes (nondeterministic, where some run has to be accepting; universal, where all runs have to be accepting; and deterministic, where there is a single run) and different acceptance conditions (Büchi, co-Büchi, and parity). We use the three letter acronyms NBW, UCW, DPW, and DFW, to refer to nondeterministic Büchi, universal co-Büchi, deterministic parity, and deterministic finite word automata, respectively. Given an LTL formula Inline graphic over AP, one can constructs an NBW Inline graphic with at most Inline graphic states such that Inline graphic [27]. Constructing an NBW for Inline graphic and then dualizing it, results in a UCW for Inline graphic, also with at most Inline graphic states. Determinization [23] then leads to a DPW for Inline graphic with at at most Inline graphic states and index Inline graphic. For full definitions of LTL, automata, and their relation, see [12].

Consider an LTL formula Inline graphic over Inline graphic. We say that Inline graphic is realizable if there is a finite-state strategy Inline graphic such that for all Inline graphic, we have that Inline graphic. That is, the computation of f on every input sequence satisfies Inline graphic. We say that a word Inline graphic is hopeful for Inline graphic if there is Inline graphic such that Inline graphic. Then, we say that Inline graphic is good-enough realizable (ge-realizable, for short) if there is a finite-state strategy Inline graphic such that for every Inline graphic that is hopeful for Inline graphic, we have that Inline graphic. That is, if there is some output sequence whose combination with x satisfies Inline graphic, then the computation of f on x satisfies Inline graphic. The LTL ge-synthesis problem is then to decide whether a given LTL formula is ge-realizable, and if so, to return a transducer that ge-realizes it. Clearly, every realizable specification is ge-realizable – by the same transducer. We say that Inline graphic is universally satisfiable if all input sequences are hopeful for Inline graphic. It is easy to see that for universally satisfiable specifications, realizability and ge-realizability coincide. On the other hand, as demonstrated in Sect. 1, there are specifications that are not realizable and are ge-realizable.

Example 1

Let Inline graphic and Inline graphic. Consider the specification Inline graphic. Clearly, Inline graphic is not realizable, as an input sequence Inline graphic is hopeful for Inline graphic iff Inline graphic. Since the system has to assign a value to q before it knowns the value of Inline graphic, it seems that Inline graphic is also not ge-realizable. As we show below, however, the specification Inline graphic is ge-realizable. Intuitively, it follows from the fact that hopeful input sequences consists of alternating p-blocks and Inline graphic-blocks. Then, by outputting Inline graphic in p-blocks and outputting q in Inline graphic-blocks, the system guarantees that each last position in a Inline graphic-block satisfies Inline graphic and each last position in a p-block satisfies Inline graphic. Formally, Inline graphic is ge-realized by the transducer Inline graphic, where Inline graphic, Inline graphic, Inline graphic, and Inline graphic.    Inline graphic

LTL Good-Enough Synthesis

Recall that a strategy Inline graphic ge-realizes an LTL formula Inline graphic if its computations on all hopeful input sequences satisfy Inline graphic. Thus, for every input sequence Inline graphic, either Inline graphic for all Inline graphic, or Inline graphic. The above suggests that algorithms for solving LTL ge-synthesis involve existential and universal quantification over the behavior of output signals. The logic EQLTL extends LTL by allowing existential quantification over atomic propositions [26]. We refer here to the case the atomic propositions are the signals in Inline graphic, and the signals in O are existentially quantified. Then, an EQLTL formula is of the form Inline graphic, and a computation Inline graphic satisfies Inline graphic iff there is Inline graphic such that Inline graphic. Dually, AQLTL extends LTL by allowing universal quantification over atomic propositions. We consider here formulas of the form Inline graphic, which are equivalent to Inline graphic. Indeed, a computation Inline graphic satisfies Inline graphic iff for all Inline graphic, we have that Inline graphic. Note that in both the existential and universal cases, the O-component of w is ignored. Accordingly, we sometimes interpret EQLTL and AQLTL formulas with respect to input sequences Inline graphic. Also note that both EQLTL and AQLTL increase the expressive power of LTL. For example, the EQLTL formula Inline graphic states that p holds in all even positions of the computation, which cannot be specified in LTL [29].

Theorem 1

The LTL ge-synthesis problem is 2EXPTIME-complete.

Proof

We start with the upper bound. Given an LTL formula Inline graphic over Inline graphic, we describe an algorithm that returns a transducer Inline graphic that ge-realizes Inline graphic, or declares that no such transducer exists.

It is not hard to see that Inline graphic ge-realizes Inline graphic iff Inline graphic realizes Inline graphic. Indeed, an input sequence Inline graphic is hopeful for Inline graphic iff Inline graphic, and so the specification Inline graphic requires all hopeful input sequences to satisfy Inline graphic. A naive construction of an NBW for Inline graphic involves a universal projection of the signals in O in an automaton for Inline graphic, and results in an NBW that is doubly exponential. In order to circumvent the extra exponent, we construct an NBW Inline graphic for Inline graphic, and then dualize it to get a UCW for Inline graphic, as follows.

Let Inline graphic be an NBW for Inline graphic and Inline graphic be an NBW for Inline graphic. Thus, Inline graphic is obtained from an NBW Inline graphic for Inline graphic by existentially projecting its transitions on Inline graphic. In more details, if Inline graphic, then Inline graphic, where for all Inline graphic and Inline graphic, we have Inline graphic.

Let Inline graphic be an NBW for the intersection of Inline graphic and Inline graphic. We can define Inline graphic as the product of Inline graphic and Inline graphic, possibly using the generalized Büchi acceptance condition (see Remark 1), thus its size is exponential in Inline graphic. The language of Inline graphic is then Inline graphic. We then solve usual synthesis for the complementing UCW. Its language is Inline graphic, as required. By [17], the synthesis problem for UCW can be solved in EXPTIME, and we are done.

The lower bound follows from the 2EXPTIME-hardness of LTL realizability [22]. The hardness proof there constructs, given a 2EXPTIME Turing machine M, an LTL formula Inline graphic that is realizable iff M accepts the empty tape. Since all input sequences are hopeful for Inline graphic, realizability and ge-realizability coincide, and we are done.    Inline graphic

Note that working with a UCW not only handles the universal quantification for free but also has the advantage of a Safraless synthesis algorithm – no determinization and parity games are needed [15, 17]. Also note that the algorithm we suggest in the proof of Theorem 1 can be generalized to handle specifications that are arbitrary positive Boolean combinations of EQLTL formulas.

Remark 1

[Products and optimizations]. Throughout the paper, we construct products of automata whose state space is Inline graphic, and states correspond to maximal consistent subsets of Inline graphic, possibly in the scope of an existential quantifier of O. Accordingly, the product can be minimized to include only consistent pairs. Also, since traditional-synthesis algorithms, in particular the Safraless algorithms we use, can handle automata with generalized Büchi and co-Büchi acceptance condition, we need only one copy of the product.    Inline graphic

Remark 2

[Determinancy of the ge-synthesis game]. Determinancy of games implies that in traditional synthesis, a specification Inline graphic is not I/O-realizable iff Inline graphic is O/I-realizable This is useful, for example when we want to synthesize a transducer of a bounded size and proceed simultaneously, aiming to synthesize either a system transducer that realizes Inline graphic or an environment transducer that realizes Inline graphic [17]. For ge-synthesis, simple dualization does not hold, but we do have determinancy in the sense that Inline graphic is not I/O-realizable iff Inline graphic is O/I-realizable. Accordingly, Inline graphic is not ge-realizable iff the environment has a strategy that generates, for each output sequence Inline graphic, a helpful input sequence Inline graphic such that Inline graphic. In the full version, we formalize and study this duality further.    Inline graphic

Guarantees in Good-Enough Synthesis

A drawback of ge-synthesis is that we do not actually know whether the specification is satisfied. In this section we describe two ways to address this drawback. The first way goes beyond providing satisfaction information and enables the designer to partition the specification into to a strong component, which should be satisfied in all environments, and a weak component, which should be satisfied only in hopeful ones. The second way augments ge-realizing transducers by flags, raised to indicate the status of the satisfaction.

ge-Synthesis with a Guarantee

Recall that ge-realizability is suitable especially in settings where we design a system that has to do its best in all environments. ge-synthesis with a guarantee is suitable in settings where we want to make sure that some components of the specification are satisfied in all environment. Accordingly, a specification is an LTL formula Inline graphic. When we ge -synthesize Inline graphic with guarantee Inline graphic, we seek a transducer Inline graphic that realizes Inline graphic and ge-realizes Inline graphic. Thus, for all input sequences Inline graphic, we have that Inline graphic, and if x is hopeful for Inline graphic, then Inline graphic.

Theorem 2

The LTL ge-synthesis with guarantee problem is 2EXPTIME-complete.

Proof

Consider an LTL formula Inline graphic over Inline graphic. It is not hard to see that a transducer Inline graphic ge-realizes Inline graphic with guarantee Inline graphic iff Inline graphic realizes Inline graphic. We can then construct a UCW Inline graphic for Inline graphic by dualizing an NBW for its negation Inline graphic, which can be constructed using techniques similar to those in the proof of Theorem 1. We then proceed with standard synthesis for Inline graphic. Note that the approach is Safraless. Taking an empty (that is, Inline graphic) guarantee, a lower bound follows from the 2EXPTIME-hardness of LTL ge-synthesis.    Inline graphic

Flags by a ge-Realizing Transducer

For a language Inline graphic and a finite word Inline graphic, let Inline graphic. That is, Inline graphic is the language of suffixes of words in L that have w as a prefix. We say that a word Inline graphic is green for L if Inline graphic is realizable. Then, a word Inline graphic is green for L if there is Inline graphic such that Inline graphic is green for L. When a system is lucky to interact with an environment that generates a green input sequence, we want the system to react in a way that generates a green prefix, and then realizes the specification. Formally, we say that a strategy Inline graphic green realizes L if for every Inline graphic, if x is green for L, then Inline graphic is green for L.1Inline graphic2 We say that a word Inline graphic is light green for L if Inline graphic is universally satisfiable, thus all input sequences are hopeful for Inline graphic. A word Inline graphic is light green for L if there is Inline graphic such that Inline graphic is light green for L. It is not hard to see that for ge-realizable languages, green and light green coincide. Indeed, if L is universally satisfiable and ge-realizable, then L is realizable.

Theorem 3

ge-realizability is strictly stronger than green realizability.

Proof

We first prove that every strategy Inline graphic that ge-realizes a specification Inline graphic also green realizes Inline graphic. Consider Inline graphic that is green for Inline graphic. By definition, there is Inline graphic such that Inline graphic is realizable. Then, for every Inline graphic, there is Inline graphic such that Inline graphic in Inline graphic. Hence, for every Inline graphic, we have that Inline graphic is hopeful. Therefore, as f ge-realizes Inline graphic, we have that Inline graphic. Thus, Inline graphic is green, and so f green realizes Inline graphic.

We continue and describe a specification that is green realizable and not ge-realizable. Let Inline graphic and Inline graphic. Consider the specification Inline graphic. Clearly, Inline graphic is not realizable, as the system has to commit a value for q before a value for Xp is known. Likewise, no word Inline graphic is green for Inline graphic, and so no finite input sequence Inline graphic is green for Inline graphic. Hence, every strategy (vacuously) green realizes Inline graphic. On the other hand, for every input sequences Inline graphic there is an output sequence Inline graphic such that Inline graphic. Thus, all input sequences are hopeful for Inline graphic. Thus, synthesis and ge-synthesis coincide for Inline graphic, which is not ge-realizable.    Inline graphic

Theorem 3 brings with it two good news. The first is that a ge-realizing transducer has the desired property of being also green realizing. The second has to do with our goal of providing the user with information about the satisfaction status, in particular raising a green flag whenever a green prefix is detected. By Theorem 3, such a flag indicates that the computation generated by our ge-realizing transducer satisfies the specification. A naive way to detect green prefixes for a specification Inline graphic is to solve the synthesis problem for Inline graphic by solving a game on top of a DPW Inline graphic for Inline graphic. The winning positions in the game are states in Inline graphic. By defining them as accepting states, we can obtain from Inline graphic a DFW for green prefixes. Then, we run this DFW in parallel with the ge-realizing transducer, and raise the green flag whenever a green prefix is detected. This, however, requires a generation of Inline graphic and a solution of parity games. Below we describe a much simpler way, which makes use of the fact that our transducer ge-realizes the specification.

Recall that if L is universally satisfiable and ge-realizable, then L is realizable. Accordingly, given a transducer Inline graphic that ge-realizes Inline graphic, we can augment it with green flags by running in parallel a DFW that detects light-green prefixes. As we argue below, constructing such a DFW only requires an application of the subset construction on top of an NBW for the existential projection of Inline graphic on Inline graphic.

Lemma 1

Given an LTL formula Inline graphic over Inline graphic, we can construct a DFA Inline graphic of size Inline graphic such that Inline graphic.

Proof

Let Inline graphic be an NBW for Inline graphic, and let Inline graphic, Inline graphic, Inline graphic be its existential projection on Inline graphic. Thus, for every Inline graphic and Inline graphic, we have Inline graphic. We define the DFW Inline graphic, where M follows the subset construction of Inline graphic: for every Inline graphic and Inline graphic, we have Inline graphic. Then, Inline graphic. Observe that Inline graphic rejects Inline graphic iff there is Inline graphic such that for all Inline graphic and Inline graphic, no state in Inline graphic accepts Inline graphic. Thus, Inline graphic rejects x iff x is not light green, and accepts it otherwise. Note that the definition of F involves universality checking, possibly via complementation, yet no determinization is required, and the size of Inline graphic is Inline graphic.    Inline graphic

Note that once we reach an accepting state in Inline graphic, we can make it an accepting loop. Indeed, once a green prefix is detected, then all prefixes that extend it are green. Accordingly, once the green flag is raised, it stays up. Also note that if an input sequence is not hopeful for Inline graphic, then none of its prefixes is light green for Inline graphic. The converse, however, is not true: an input sequence may be hopeful and still have no light green prefixes. For example, taking Inline graphic, the input sequence Inline graphic is hopeful for Inline graphic, yet none of its prefixes is green light, as it can be extended to an input sequence with Inline graphic.

Green flags provide information about satisfaction. Two additional flags of interest are related to safety and co-safety properties:

  • A word Inline graphic is red for L if Inline graphic. A word Inline graphic is red for L if for all Inline graphic, we have that Inline graphic is red for L. Thus, when the environment generates x, then no matter how the system responds, L is not satisfied.

  • a word Inline graphic is blue for L when Inline graphic, and then define a word Inline graphic as blue for L if there is Inline graphic such that Inline graphic is blue for L. Thus, when the environment generates x, the system can respond in a way that guarantees satisfaction no matter how the interaction continues.

A monitor that detects red and blue prefixes for L can be added to a transducer that ge-realizes L. As has been the case with the monitor for green prefixes, its construction is based on applying the subset construction on an NBW for L [16]. Also, once a red or blue flag is raised, it stays up. In a way analogous to green realizability, we seek a transducer that ge-realizes the specification and generates a red prefix only if all interactions generate a red prefix, and generates a blue prefix whenever this is possible. In the full version, we show that while ge-realization implies red realization, it may conflict with blue realization.

High-Quality Good-Enough Synthesis

ge-synthesis is of special interest when the satisfaction value of the specification is multi-valued, and we want to synthesize high-quality systems. We start by defining the multi-valued logic Inline graphic, which is our multi-valued specification formalism. We then study Inline graphicge-synthesis, first in a worst-case approach, where the satisfaction value of a transducer is the satisfaction value of its computation with the lowest satisfaction value, and then in a stochastic approach, where it is the expected satisfaction value, given a distribution of the inputs.

The Logic Inline graphic

Let AP be a set of Boolean atomic propositions and let Inline graphic be a set of quality operators. An Inline graphic formula is one of the following:

  • Inline graphic, Inline graphic, or p, for Inline graphic.

  • Inline graphic, Inline graphic, or Inline graphic, for Inline graphic formulas Inline graphic and a function Inline graphic.

The semantics of Inline graphic formulas is defined with respect to infinite computations over AP. For a computation Inline graphic and position Inline graphic, we use Inline graphic to denote the suffix Inline graphic. The semantics maps a computation w and an Inline graphic formula Inline graphic to the satisfaction value of Inline graphic in w, denoted Inline graphic. The satisfaction value is in [0, 1] and is defined inductively as follows.

  • Inline graphic and Inline graphic.

  • For Inline graphic, we have that Inline graphic if Inline graphic, and Inline graphic if Inline graphic.

  • Inline graphic.

  • Inline graphic.

  • Inline graphic.

The logic Inline graphic can be viewed as Inline graphic for Inline graphic that models the usual Boolean operators. In particular, the only possible satisfaction values are 0 and 1. We abbreviate common functions as described below. Let Inline graphic. Then,graphic file with name 501999_1_En_28_Figa_HTML.jpg

The realizability problem for Inline graphic is an optimization problem: For an Inline graphic specification Inline graphic and a transducer Inline graphic, we define the satisfaction value of Inline graphic in Inline graphic, denoted Inline graphic, by Inline graphic, namely the satisfaction value of Inline graphic in the worst-case. Then, the synthesis problem is to find, given Inline graphic, a transducer that maximizes its satisfaction value. Moving to a decision problem, given Inline graphic and a threshold value Inline graphic, we say that Inline graphic is v-realizable if there exists a transducer Inline graphic such that Inline graphic, and the synthesis problem is to find, given Inline graphic and v, a transducer Inline graphic that v-realizes Inline graphic.

For an Inline graphic formula Inline graphic, let Inline graphic be the set of possible satisfaction values of Inline graphic in arbitrary computations. Thus, Inline graphic.

Theorem 4

[1]. Consider an Inline graphic formula Inline graphic.

  • Inline graphic.

  • For every predicate Inline graphic, there exists an NBW Inline graphic such that Inline graphic. Furthermore, Inline graphic has at most Inline graphic states [1].

As with LTL, we define the existential and universal extensions Inline graphic and Inline graphic of Inline graphic. Here too, we consider the case Inline graphic, with the signals in O being quantified. Then, Inline graphic and Inline graphic.

Remark 3

[On the semantics of Inline graphic ]. It is tempting to interpret an expression like Inline graphic as “there exists an output sequence y such that Inline graphic”. By the semantics of Inline graphic, however, Inline graphic actually means that Inline graphic. Thus, the correct interpretation is “for all output sequences y, we have that Inline graphic”.    Inline graphic

Inline graphicge-Synthesis

For a value Inline graphic, we say that x is v-hopeful for Inline graphic if there is Inline graphic such that Inline graphic. We study two variants of Inline graphicge-synthesis:

  • In Inline graphicge -synthesis with a threshold, the input is an Inline graphic formula Inline graphic and a value Inline graphic, and the goal is to generate a transducer whose computation on every input sequence that is v-hopeful has satisfaction value at least v. Formally, a function Inline graphic ge-realizes Inline graphic with threshold v if for every Inline graphic, if x is v-hopeful, then Inline graphic.

  • In Inline graphicge -synthesis, the input is an Inline graphic formula Inline graphic, and the goal is to generate a transducer whose computation on every input sequence has the highest possible satisfaction value for this input sequence. Formally, a function Inline graphic ge-realizes Inline graphic if for every Inline graphic and value Inline graphic, if x is v-hopeful, then Inline graphic.

In the Boolean case, the two variants coincide, taking Inline graphic. Indeed, then, for every Inline graphic, if x is hopeful, then Inline graphic has to satisfy Inline graphic. We note that ge-realization with a threshold is not monotone, in the sense that decreasing the threshold need not lead to ge-realization. Indeed, the lower is the threshold v, the more input sequences are v-helpful (see Example 2). Accordingly, we do not search for a maximal threshold, and rather may ask about a desired threshold or about ge-synthesis without a threshold.

Solving the ge-synthesis problem, a naive combination of the automata construction of Theorem 4 with the projection technique of Theorem 1, corresponds to an erroneous semantics of Inline graphic, as noted in Remark 3. Before describing our construction, it is helpful to state the correct (perhaps less intuitive) interpretation of existential and universal quantification in the quantitative setting:

Lemma 2

For every Inline graphic formula Inline graphic and an input sequence Inline graphic, we have that Inline graphic. Accordingly, for every value Inline graphic, we have that Inline graphic iff Inline graphic.

Proof

By definition, Inline graphic. Then, Inline graphic iff Inline graphic iff Inline graphic.    Inline graphic

Consider an Inline graphic formula Inline graphic, a value Inline graphic, and an input sequence Inline graphic. Recall that x is v-hopeful for Inline graphic if there is Inline graphic such that Inline graphic. Equivalently, Inline graphic. Indeed, Inline graphic, which is greater or equal to v iff there is Inline graphic such that Inline graphic. Hence, x is not v-hopeful for Inline graphic if Inline graphic. Equivalently, by Lemma 2, Inline graphic. Accordingly, for a strategy Inline graphic, an input sequence Inline graphic, and a value Inline graphic, we say that f is v-good for x with respect to Inline graphic, if Inline graphic or Inline graphic.

Example 2

Let Inline graphic and Inline graphic. Consider the Inline graphic formula Inline graphic. Checking for which values v a strategy f is v-good for x with respect to Inline graphic, we examine whether Inline graphic or Inline graphic. Since Inline graphic refers only to the first position in the computation, it is enough to examine Inline graphic and Inline graphic. For example, if Inline graphic and Inline graphic, then Inline graphic, Inline graphic, and Inline graphic. Hence, f is v-good for x with respect to Inline graphic if Inline graphic or Inline graphic, thus Inline graphic. Similarly, we have the following.

  • If Inline graphic and Inline graphic then f is v-good for x when Inline graphic.

  • If Inline graphic and Inline graphic then f is v-good for x when Inline graphic.

  • If Inline graphic andInline graphic then f is v-good for x when Inline graphic.

Theorem 5

The Inline graphic  ge-synthesis with threshold problem is 2EXPTIME-complete.

Proof

We show we can adjust the upper bound described in the proof of Theorem 1 to the multi-valued setting. Given an Inline graphic formula Inline graphic over Inline graphic and a threshold Inline graphic, we describe an algorithm that returns a transducer Inline graphic that ge-realizes Inline graphic with threshold v, or declares that no such transducer exists.

By definition, we have that Inline graphic ge-realizes Inline graphic with threshold v if for every input sequence x, we have that Inline graphic is v-good for x with respect to Inline graphic. Thus, Inline graphic or Inline graphic. We construct a UCW whose language is Inline graphic.

Let Inline graphic be an NBW for Inline graphic and Inline graphic be an NBW for Inline graphic. Thus, Inline graphic is obtained from an NBW Inline graphic for Inline graphic by existentially projecting its transitions on Inline graphic. By Theorem 4, both Inline graphic and Inline graphic are of size exponential in Inline graphic.

Let Inline graphic be an NBW for the intersection of Inline graphic and Inline graphic. The language of Inline graphic is then Inline graphic. We then solve usual synthesis for the complementing UCW, whose language is Inline graphic, as required. By [17], the synthesis problem for UCW can be solved in EXPTIME.

The lower bound follows from the 2EXPTIME-hardness of LTL ge-realizability.    Inline graphic

Theorem 6

The Inline graphicge-synthesis problem is 2EXPTIME-complete.

Proof

We start with the upper bound. Given an Inline graphic specification Inline graphic over Inline graphic, we describe an algorithm that returns a transducer Inline graphic that ge-realizes Inline graphic or declares that no such transducer exists.

As discussed above, a transducer Inline graphic ge-realizes Inline graphic iff for every input sequence Inline graphic and value Inline graphic, we have that Inline graphic is v-good for x with respect to Inline graphic. Accordingly, we construct a UCW whose language is Inline graphic.

For Inline graphic, let Inline graphic be an NBW for Inline graphic, as constructed in the proof of Theorem 5, and let Inline graphic be the union of Inline graphic for all Inline graphic. By Theorem 4, the size of Inline graphic is exponential in Inline graphic, and thus so is the size of Inline graphic. We then solve usual synthesis for the complementing UCW, whose language is as required. By [17], the synthesis problem for UCW can be solved in EXPTIME. The lower bound follows from the 2EXPTIME-hardness of LTL ge-realizability.    Inline graphic

Remark 4

[Tuning hope down]. The quantitative setting allows the designer to tune down “satisfaction by hoplessness”: rather than synthesizing Inline graphic, we can have a factor Inline graphic and synthesize Inline graphic. In Sect. 5.3 below we study additional ways to refer to hopefulness levels.

Inline graphic Assume-Guarantee ge-Synthesis

In Sect. 5.2, we seek a transducer Inline graphic such that for a given or for all values Inline graphic and input sequences Inline graphic, if Inline graphic then Inline graphic. In this section we measure the quality of a transducer Inline graphic by analyzing richer relations between Inline graphic and Inline graphic. The setting has the flavor of quantitative assume-guarantee synthesis [3]. There, the specification consists of a multi-valued assumption A, which in our case is Inline graphic, and a multi-valued guarantee G, which is our case is Inline graphic.

There are different ways to analyze the relation between Inline graphic and Inline graphic. To this end, we assume that we are given a function Inline graphic that given the satisfaction values of Inline graphic and of Inline graphic, outputs a combined satisfaction value. We assume that Inline graphic is decreasing in the first component and increasing in the second component. This corresponds to the intuition that a lower satisfaction value of Inline graphic and a higher satisfaction value of Inline graphic both yield a higher overall score. Also, since Inline graphic for all Inline graphic, we assume that the first component is greater than or equal to the second. Finally, we require Inline graphic to be efficiently computed. Some natural Inline graphic functions include:

  • The quantitative implication function: Inline graphic. This captures the quantitative notion of the implication Inline graphic.

  • The (negated) difference function: Inline graphic. This captures how far the satisfaction value for the given computation is from the best satisfaction value. Since Inline graphic, the range of the function is indeed [0, 1].

  • The ratio function, given by some normalization to [0, 1] of the function Inline graphic, which captures the “relative success” with respect to the best possible satisfaction value.

The choice of an appropriate Inline graphic function depends on the setting. Implication is in order when harsh environments may outweigh the actual performance of the system. For example, if our specification measures the uptime of a server in a cluster, then environments that cause very frequent power failures render the server unusable, as the overhead of reconnecting it outweighs its usefulness. In such a case, being shut down is better than continuously trying to reconnect, and so we give a higher satisfaction value for the server being down, which depends only on the environment. Then, as demonstrated with the cleaning robot in Sect. 1, the difference and ratio functions are fairly natural when measuring “realization of potential”. We now describe a more detailed example when these measures are in order.

Example 3

Consider a controller for an elevator in an n-floor building. The environment sends to the controller requests, by means of a truth assignment to Inline graphic, indicating the subset of floors in which the elevator is requested. Then, the controller assigns values to Inline graphic, directing the elevator to go up, go down, or stay. The satisfaction value of the specification Inline graphic reflects the waiting time of the request with the slowest response: it is 0 when this time is more than 2n, and is 1 when the slowest request is granted immediately. Sure enough, there is no controller that attains satisfaction value 1 on all input sequences, and so Inline graphic is not realizable with satisfaction value 1. Also, adding assumptions about the behavior of the environment is not of much interest. Using AG ge-realizability, we can synthesize a controller that behaves in an optimal way. For example, using the difference function, we measure the performance of the controller on an input sequence Inline graphic with respect to the best possible performance on x. Note that such a best performance needs a look-ahead on requests yet to come, which is indeed the satisfaction value of Inline graphic in x. Thus, the assumption Inline graphic actually gives us the performance of a good-enough off-line controller. Accordingly, using the ratio function, we can synthesize a system with the best competitive ratio for an on-line interaction [7].    Inline graphic

Given an Inline graphic formula Inline graphic and a function Inline graphic, we define the ge -AG-realization value of Inline graphic in a transducer Inline graphic by Inline graphic. Then, our goal in AG ge -realizability is to find, given an Inline graphic formula Inline graphic and a function Inline graphic, the maximal value Inline graphic such that there exists a transducer Inline graphic whose AG ge-realization value of Inline graphic is v. The AG ge -synthesis problem is then to find such a transducer.

We start by solving the decision version of AG ge-realizability.

Theorem 7

The problem of deciding, given an Inline graphic formula Inline graphic, a function Inline graphic, and a threshold Inline graphic, whether there exists a transducer Inline graphic whose AG ge-realization value of Inline graphic is v, is 2EXPTIME-complete.

Proof

Recall that Inline graphic is the set of possible satisfaction values of Inline graphic (and hence of Inline graphic), and that by Theorem 4, we have that Inline graphic. Let Inline graphic. Intuitively, G is the set of satisfaction-value pairs Inline graphic that are allowed to be generated by a transducer whose AG ge-realization value of Inline graphic is at least v. By definition, AG ge-realization of Inline graphic with value v coincides with realization of the language Inline graphic. By the monotonicity assumption on Inline graphic, for every Inline graphic, we have that Inline graphic for every Inline graphic and Inline graphic. Hence, we can write Inline graphic, and proceed to construct an NBW for Inline graphic by taking the union of NBWs Inline graphic for all Inline graphic, each of which is the product of NBWs Inline graphic and Inline graphic, as in the proof of Theorem 5.

Aiming to proceed Safralessly, we can also construct a UCW for Inline graphic, as follows. First, note that by the monotonicity of Inline graphic, for every Inline graphic we have that Inline graphic iff for every Inline graphic, we have that Inline graphic or Inline graphic. Hence, Inline graphic, and so by dualization we have Inline graphic. Hence, we can obtain a UCW for Inline graphic by dualizing an NBW that is the union of NBWs Inline graphic, for all Inline graphic, each of which is the product of NBWs Inline graphic and Inline graphic.

Observe that in all cases, the size of the NBW is Inline graphic. Indeed, there are at most Inline graphic pairs in the union, and, by Theorem 4, the size of the NBW for each pair is Inline graphic.

The lower bound follows from the 2EXPTIME-hardness of LTL ge-realizability.    Inline graphic

By Theorem 4, the number of possible satisfaction values for Inline graphic is at most Inline graphic. Thus, the number of possible values for Inline graphic, where A and G are satisfaction values of Inline graphic, is at most Inline graphic. Using binary search over the image of Inline graphic, we can use Theorem 7 to obtain the following.

Corollary 1

The AG ge-synthesis problem can be solved in doubly-exponential time.

Remark 5

[ ge-synthesis as a special case of AG ge-synthesis]. The two approaches taken in Sect. 5.2 can be captured by an appropriate Inline graphic function. Indeed, for ge-synthesis with a threshold, we can use the function Inline graphic with Inline graphic if Inline graphic, and Inline graphic otherwise. For ge-synthesis (without a threshold), we can use the function Inline graphic with Inline graphic if Inline graphic, and Inline graphic otherwise (recall that Inline graphic by definition). However, the solution described in Sect. 5.2 is simpler than the one described here for the general case.    Inline graphic

Inline graphicge-Synthesis in Stochastic Environments

The setting of Inline graphicge-synthesis studied in Sects. 5.2 and 5.3 takes the different satisfaction values into an account, but is binary, in the sense that a specification is either (possibly AG) ge-realizable, or is not. In particular, in case the specification is not ge-realizable, synthesis algorithms only return “no”. In this section we add a quantitative measure also to the underlying realizability question. We do so by assuming a stochastic environment, with a known distribution on the inputs sequences, and analyzing the expected performance of the system.

For completeness, we remind the reader of some basics of probability theory. For a comprehensive reference see e.g.,  [25]. Let Inline graphic be a finite alphabet, and let Inline graphic be some probability distribution over Inline graphic. For example, in the uniform distribution over Inline graphic, the probability space is induced by sampling each letter with probability Inline graphic, corresponding to settings in which each signal in I always holds in probability Inline graphic. We assume Inline graphic is given by a finite Markov Decision Process (MDP). That is, Inline graphic is induced by the distribution of each letter Inline graphic at each time step, determined by a finite stochastic control process that takes into account also the outputs generated by the system (see  [2] for the precise model). A random variable is then a function Inline graphic. When X has a finite image V, which is the case in our setting, its expected value is Inline graphic. Intuitively, Inline graphic is the “average” value that X attains. Next, consider an event Inline graphic. The conditional expectation of X with respect to E is Inline graphic, where Inline graphic is the random variable that assigns X(w) to Inline graphic and 0 to Inline graphic. Intuitively, Inline graphic is the average value that X attains when restricting to words in E, and normalizing according to the probability of E itself.

We continue and review the high-quality synthesis problem [2], where the ge variant is not considered. There, the environment is assumed to be stochastic and we care for the expected satisfaction value of an Inline graphic specification in the computations of a transducer Inline graphic, assuming some given distribution on the inputs sequences. Formally, let Inline graphic be a random variable that assigns each sequence Inline graphic of input signals with Inline graphic. Then, when the sequences in Inline graphic are sampled according to a given distribution Inline graphic of Inline graphic, we define Inline graphic. Since Inline graphic is fixed, we omit it from the notation and use Inline graphic in the following.

Remark 6

[Relating LTL ge-synthesis with stochastic Inline graphic  synthesis] Given an LTL formula Inline graphic, we can view it as an Inline graphic formula with possible satisfaction values Inline graphic, apply to it high-quality synthesis a-la [2], and find a transducer Inline graphic that maximizes Inline graphic. An interesting observation is that if Inline graphic ge-realizes Inline graphic, then it also maximizes Inline graphic. Indeed, all input sequences that can contribute to the expected satisfaction value, do so.    Inline graphic

We introduce and study two measures for high-quality synthesis in a stochastic environment. In the first, termed expected ge -synthesis, all input sequences are sampled, yet the satisfaction value in each input sequence takes its hopefulness level into account. In the second, termed conditional expected ge -synthesis, only hopeful input sequences are sampled.

We start with expected ge-synthesis. There, instead of associating each sequence Inline graphic with Inline graphic, we associate it with Inline graphic, where Inline graphic is as described in Sect. 5.3, thus capturing the assume-guarantee semantics of quantitative ge-synthesis. Then, we define Inline graphic. For example, taking Inline graphic as implication, we have Inline graphic, capturing the semantics of Inline graphic.

Then, in conditional expected ge-synthesis, we consider Inline graphic as an environment assumption, and factor it in using conditional expectation, parameterized by a threshold Inline graphic. Formally, let Inline graphic denote the event Inline graphic. Then, we define Inline graphic, assuming the event Inline graphic has a strictly positive probability.

In [2], it is shown that the high-quality synthesis problem can be solved in doubly-exponential time, also in the presence of environment assumptions. In the solution, the first step is the translation of the involved formulas to DPWs. In order to extract from [2] the results relevant to us, we describe them by means of discrete quantitative specifications, defined as follows. A discrete quantitative specification Inline graphic over Inline graphic is given by means of a sequence Inline graphic of DPWs, with Inline graphic, and sequence Inline graphic of values. For every Inline graphic, the satisfaction value of w in Inline graphic, denoted Inline graphic, is Inline graphic. We refer to n as the depth of Inline graphic.

Theorem 8

( [2]). Consider a discrete quantitative specification Inline graphic over Inline graphic. Let n be its depth and m be the size of the largest DPW in Inline graphic. For a transducer Inline graphic, let Inline graphic be a random variable that assigns a word Inline graphic with Inline graphic.

  1. We can synthesize a transducer Inline graphic that maximizes Inline graphic in time Inline graphic.

  2. Given a DPW Inline graphic over Inline graphic such that Inline graphic, we can synthesize a transducer Inline graphic that maximizes Inline graphic in time Inline graphic, where k is the size of Inline graphic.

We can now state the main results of this section.

Theorem 9

Consider an Inline graphic formula Inline graphic.

  1. Given a function Inline graphic, we can find in doubly-exponential time a transducer that maximizes Inline graphic.

  2. Given a threshold Inline graphic, we can find in doubly-exponential time a transducer that maximizes Inline graphic.

Proof

Let Inline graphic be the possible satisfaction values of Inline graphic (and hence also of Inline graphic and of Inline graphic). By Theorem 4, we have that Inline graphic. For each Inline graphic, we can construct a DPW Inline graphic as in Theorem 7. It is not hard to see that the discrete quantitative specification given by the DPWs Inline graphic and the values Inline graphic, for Inline graphic, is qual to the specification Inline graphic. Thus, by Theorem 8 (1), we can find a transducer that maximizes Inline graphic in time Inline graphic.

Next, given Inline graphic, we can check whether Inline graphic, for example by converting a DPW Inline graphic to an MDP, and reasoning about its Ergodic-components. Then, by Theorem 8 (2), we can find a transducer that maximizes Inline graphic, in time Inline graphic.    Inline graphic

Corollary 2

The (possibly conditional) expected ge-synthesis problem for Inline graphic can be solved in doubly-exponential time.

Guarantees in High-Quality ge-Synthesis

As in the Boolean setting, also in the high-quality one we would like to add to a ge-realizing transducer guarantees and indications about the satisfaction level. As we detail below, the quantitative setting offers many possible ways to do so.

High-Quality ge-Synthesis with Guarantees. We consider specifications of the form Inline graphic, where essentially, we seek a transducer that realizes Inline graphic and (possibly AG) ge-realizes Inline graphic. Maximizing the realization value of Inline graphic may conflict with maximizing the ge-realization value of Inline graphic, and there are different ways to trade-off the two goals. Technically, in the decision-problem variant, we are given two thresholds Inline graphic, and we seek a transducer Inline graphic that realizes Inline graphic with value at least Inline graphic, and ge-realizes Inline graphic with value at least Inline graphic. Then, one may start, for example, by maximizing the value Inline graphic, and then find the maximal value Inline graphic that may be achieved simultaneously. Alternatively, one may prefer to maximize Inline graphic, or some other combination of Inline graphic and Inline graphic. Also, it is possible to decompose Inline graphic further, to several strong and weak components, each with its desired threshold.

The solutions in the different settings all involve a construction of a UCW Inline graphic, and its product with the automata constructed in the solutions for the different ge-synthesis variants. We thus have the following. We note that when the solution for Inline graphic is Safraless, we can use a UCW for Inline graphic to maintain a Safraless construction.

Theorem 10

The problem of Inline graphic high-quality ge-synthesis with a guarantee can be solved in doubly-exponential time.

Flags by a High-Quality ge-Realizing Transducer. In the quantitative setting, we parameterized the flags raised by the ge-realizing transducer by values in [0, 1], indicating the announced satisfaction level. Thus, rather than talking about prefixes being green, red, or blue, we talk about them being v-green, v-red, and v-blue, for Inline graphic, which essentially means that a satisfaction value of at least v is guarantees (in green and blue flags) or is impossible (in red ones). We can think of those as “degrees” of green, red, and blue. Below, we formalize this intuition and argue that even an augmentation of a transducer that ge-realizes Inline graphic by flags for all values in Inline graphic leaves the problem in doubly-exponential time.

A quantitative language over Inline graphic is Inline graphic. For a quantitative language L and a word Inline graphic, we define Inline graphic as the quantitative language where for all Inline graphic, we have Inline graphic. For a value Inline graphic, a word Inline graphic is v-green for L if Inline graphic is v-realizable. That is, there is a transducer Inline graphic such that Inline graphic. A word Inline graphic is v-green for L if there is Inline graphic such that Inline graphic is v-green for L. Thus, when the environment generates x, the system can respond in a way that would guarantee v-realizability. Finally, we say that L is green realizable if there is a strategy Inline graphic that for every threshold v and for every input Inline graphic that is v-green for L, we have that Inline graphic is v-green for L. It is not hard to see that Theorem 3 carries over to the quantitative setting, thus quantitative optimal realizability is strictly stronger than quantitative green realizability. In particular, if a transducer Inline graphic optimally realizes an Inline graphic formula Inline graphic, then Inline graphic also green realizes Inline graphic. In the full version, we describe quantitative definitions also for red and blue prefixes, and describe monitors for the detection of the various types of prefixes.

Discussion

We introduced and solved several variants of ge-synthesis. Our complexity results are tight and show that ge-synthesis is not more complex than traditional synthesis. In practice, however, traditional synthesis algorithms do not scale well, and much research is devoted for the development of methods and heuristics for coping with the implementation challenges of synthesis. A natural future research direction is to extend these heuristics and methods for ge-synthesis. We mention here two specific examples.

Efficient synthesis algorithms have been developed for fragments of LTL [21]. Most notable is the GR(1) fragment  [18], which supports assume-guarantee reasoning, and for which synthesis has an efficient symbolic solution. Adding existential quantification to GR(1) specifications, which is how we handled LTL ge-synthesis, is not handled by its known algorithms, and is an interesting challenge. The success of SAT-based model-checking have led to the development of SAT-based synthesis algorithms [6], where the synthesis problem is reduced to satisfiability of a QBF formula. The fact the setting already includes quantifiers suggests it can be extended to ge-synthesis. A related effort is bounded synthesis algorithms [13, 24], where the synthesized systems are assumed to be of a bounded size and can be represented symbolically [10].

Footnotes

1

Note that while the definition of green realization does not refer to Inline graphic directly, we have that Inline graphic is green iff L is realizable, in which case all Inline graphic are green.

2

While synthesis corresponds to finding a winning strategy for the system, green synthesis can be viewed as a subgame-perfect best-response strategy, where the system does its best in every subgame, even if it loses the overall game.

S. Almagor—Supported by the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 837327.

O. Kupferman—Supported in part by the Israel Science Foundation, grant No. 2357/19.

Contributor Information

Shuvendu K. Lahiri, Email: shuvendu.lahiri@microsoft.com

Chao Wang, Email: wang626@usc.edu.

Shaull Almagor, Email: shaull@cs.technion.ac.il.

Orna Kupferman, Email: orna@cs.huji.ac.il.

References

  • 1.Almagor S, Boker U, Kupferman O. Formalizing and reasoning about quality. J. ACM. 2016;63(3):24:1–24:56. doi: 10.1145/2875421. [DOI] [Google Scholar]
  • 2.Almagor, S., Kupferman, O.: High-quality synthesis against stochastic environments. In: Proceedings of 25th Annual Conference of the European Association for Computer Science Logic, LIPIcs, vol. 62, pp. 28:1–28:17 (2016)
  • 3.Almagor S, Kupferman O, Ringert JO, Velner Y. Quantitative assume guarantee synthesis. In: Majumdar R, Kunčak V, editors. Computer Aided Verification; Cham: Springer; 2017. pp. 353–374. [Google Scholar]
  • 4.Bloem R, Chatterjee K, Henzinger TA, Jobstmann B. Better quality in synthesis through quantitative objectives. In: Bouajjani A, Maler O, editors. Computer Aided Verification; Heidelberg: Springer; 2009. pp. 140–156. [Google Scholar]
  • 5.Bloem R, Chatterjee K, Jobstmann B. Handbook of Model Checking. Cham: Springer; 2018. Graph games and reactive synthesis; pp. 921–962. [Google Scholar]
  • 6.Bloem, R., Egly, U., Klampfl, P., Könighofer, R., Lonsing, F.: Sat-based methods for circuit synthesis. In: Proceedings of 14th International Conference on Formal Methods in Computer-Aided Design, pp. 31–34. IEEE (2014)
  • 7.Borodin A, El-Yaniv R. Online Computation and Competitive Analysis. New York: Cambridge University Press; 1998. [Google Scholar]
  • 8.Chatterjee K, Henzinger TA, Jobstmann B. Environment assumptions for synthesis. In: van Breugel F, Chechik M, editors. CONCUR 2008 - Concurrency Theory; Heidelberg: Springer; 2008. pp. 147–161. [Google Scholar]
  • 9.Church, A.: Logic, arithmetics, and automata. In: Proceedings of International Congress of Mathematicians, vol. 1962, pp. 23–35. Institut Mittag-Leffler (1963)
  • 10.Ehlers R. Symbolic bounded synthesis. In: Touili T, Cook B, Jackson P, editors. Computer Aided Verification; Heidelberg: Springer; 2010. pp. 365–379. [Google Scholar]
  • 11.Fisman D, Kupferman O, Lustig Y. Rational synthesis. In: Esparza J, Majumdar R, editors. Tools and Algorithms for the Construction and Analysis of Systems; Heidelberg: Springer; 2010. pp. 190–204. [Google Scholar]
  • 12.Kupferman O. Automata theory and model checking. In: Clarke E, Henzinger T, Veith H, Bloem R, editors. Handbook of Model Checking. Cham: Springer; 2018. pp. 107–151. [Google Scholar]
  • 13.Kupferman, O., Lustig, Y., Vardi, M.Y., Yannakakis, M.: Temporal synthesis for bounded systems and environments. In: Proceedings of 28th Symposium on Theoretical Aspects of Computer Science, pp. 615–626 (2011)
  • 14.Kupferman O, Perelli G, Vardi MY. Synthesis with rational environments. Ann. Math. Artif. Intell. 2016;78(1):3–20. doi: 10.1007/s10472-016-9508-8. [DOI] [Google Scholar]
  • 15.Kupferman O, Piterman N, Vardi MY. Safraless compositional synthesis. In: Ball T, Jones RB, editors. Computer Aided Verification; Heidelberg: Springer; 2006. pp. 31–44. [Google Scholar]
  • 16.Kupferman O, Vardi MY. Model checking of safety properties. Formal Methods Syst. Des. 2001;19(3):291–314. doi: 10.1023/A:1011254632723. [DOI] [Google Scholar]
  • 17.Kupferman, O., Vardi, M.Y.: Safraless decision procedures. In: Proceedings of 46th IEEE Symposium on Foundations of Computer Science, pp. 531–540 (2005)
  • 18.Piterman N, Pnueli A, Sa’ar Y. Synthesis of reactive(1) designs. In: Emerson EA, Namjoshi KS, editors. Verification, Model Checking, and Abstract Interpretation; Heidelberg: Springer; 2005. pp. 364–380. [Google Scholar]
  • 19.Pnueli A. The temporal semantics of concurrent programs. Theor. Comput. Sci. 1981;13:45–60. doi: 10.1016/0304-3975(81)90110-9. [DOI] [Google Scholar]
  • 20.Pnueli, A., Rosner, R.: On the synthesis of a reactive module. In: Proceedings of 16th ACM Symposium on Principles of Programming Languages, pp. 179–190 (1989)
  • 21.Alur R, La Torre S, Madhusudan P. Playing games with boxes and diamonds. In: Amadio R, Lugiez D, editors. CONCUR 2003 - Concurrency Theory; Heidelberg: Springer; 2003. pp. 128–143. [Google Scholar]
  • 22.Rosner, R.: Modular synthesis of reactive systems. Ph.D thesis, Weizmann Institute of Science (1992)
  • 23.Safra, S.: On the complexity of Inline graphic-automata. In: Proceedings of 29th IEEE Symposium on Foundations of Computer Science, pp. 319–327 (1988)
  • 24.Schewe S, Finkbeiner B. Bounded synthesis. In: Namjoshi KS, Yoneda T, Higashino T, Okamura Y, editors. Automated Technology for Verification and Analysis; Heidelberg: Springer; 2007. pp. 474–488. [Google Scholar]
  • 25.Sheldon R. A First Course in Probability. Delhi: Pearson Education India; 2002. [Google Scholar]
  • 26.Sistla AP, Vardi MY, Wolper P. The complementation problem for Büchi automata with applications to temporal logic. Theor. Comput. Sci. 1987;49:217–237. doi: 10.1016/0304-3975(87)90008-9. [DOI] [Google Scholar]
  • 27.Vardi MY, Wolper P. Reasoning about infinite computations. Inf. Comput. 1994;115(1):1–37. doi: 10.1006/inco.1994.1092. [DOI] [Google Scholar]
  • 28.Winnicott DW. Playing and Reality. Harmondsworth: Penguin; 1971. [Google Scholar]
  • 29.Wolper, P.: Temporal logic can be more expressive. In: Proceedings of 22nd IEEE Symposium on Foundations of Computer Science, pp. 340–348 (1981)

Articles from Computer Aided Verification are provided here courtesy of Nature Publishing Group

RESOURCES