 Hi, I'm Ekansh Deep Gupta. I'm from Chennai Mathematical Institute. And today, I'll be talking about the well-structured problem for Pressburger counter machines. And this is joint work with Olaf Inkel. The title has two things, well-structured problem and Pressburger counter machines. Let's define the first one. So for that, I'll define well-structured transition systems. So an ordered transition system has a set of configurations. It has a transition relation and an ordering on the configurations. And it is well-structured if it satisfies two conditions. The first one is that the ordering needs to be a well-caused order. And the second one is called the monotony condition, which is that if there's a transition from S1 to S1 prime, and if I start from some configuration which is bigger than S1, then I should be able to reach some configuration which is bigger than S1 prime in the reachability relation. That is the monotony condition. And there's a natural stronger condition which is called strong monotony, which imposes that it should be reachable in one step. Earlier, it just needed to be reachable. Now it should be reachable in one step. So these are respectively called the well-structured and the strong well-structured transition systems. So this is quite a robust class of transition systems. Like all of these are examples, PetriNites, vector addition systems. All of these can be seen as WSTS under appropriate orderings. And so the reason this is studied is because the coverability problem is decidable on WSTS. The coverability problem is given two configurations. Can you go from one to some configuration which is bigger than the other? So it turns out this is decidable. And there's a backwards algorithm which came much earlier in 1996. And there's a much more recent forward algorithm on downward close sets, which came in 2017. So now we come to the motivation for the problem that we studied. So suppose we're given a class of transition systems, which is not decidable in general. The problem is not decidable. But we're given a specific instance of the model. And we want to check if the problem can be solved on this model. So if the model is nice enough, if it satisfies monotony, then we can use the results on well-structured transition systems for this model. So for example, this Minsky machine, if you look, it satisfies strong monotony. So we can solve the coverability problem, et cetera, on this. So we wanted to come up with these sorts of things. So the question we asked was, given a transition system, can we check whether it is well-structured or not? So that is the well-structured problem. And correspondingly, the strong well-structured problem, whether it is strongly monotonous. So these are the problems. Now let's introduce the model. So Pressburger arithmetic, everyone knows, I'm sure. It's the first-order fragment over natural numbers with additions. So these are just some formulae you can write. You can check divisibility, multiplication by constant, and so on. And yeah, turns out it's quite a nice logic. Firstly, because it is decidable, that is given a formula in Pressburger, you can check whether it's valid or not. And this is shown by quantifier elimination on the formulae, whereby you add modulus operators and yeah. And the second thing is, this is quite expressive in the for-counter systems. So the formal model is that you have decounters, some number of counters. You have some states. And your transitions are labeled by formulae, which have twice the number of free variables. The first copy is for the value before the transition. The second copy is for the ones after. So this is an example of a Pressburger counter machine. The formulae x prime equals 19 minus x, and so on. So for instance, this is a sample run. You can start with the counter 0, and then take the loop, and go to 19, and so on. So these are quite simple formulae. You can express quite complicated things as well in Pressburger. But so this is like a recurring example. We'll see this later on as well. Right? There are no tests in our history. No, no. This is quite a simple model. But yeah, you can have zero tests. You can check divisibility, and so on. You can have quite complicated things. You're a god. Yeah, yeah. You can express quite a lot of. You can express guards and everything in Pressburger. Right. So we look at Pressburger counter machines, and we also look at a lot of subclasses of those. So one is functional counter machines, where each formula, each transition formula, is a partial function. Each input has at most one output. Then there's Minsky machines. These can also be expressed as Pressburger counter machines, where you have translations or zero tests. Then Affine-Vass, this is quite a well-studied model, where all the transitions are of the form, x prime equals ax plus b, where a and b are matrices. Note that we're allowing negative values in the matrices as well. And since we can multiply by constants and so on in Pressburger arithmetic, this is also like Pressburger expressible. And then we look at some restrictions of Affine-Vass, which is positive Avass. And here we only allow positive values in the matrix, whereas earlier we allowed negative values as well. And then we have totally positive Avass, which is another restriction, where we say that b can also only be positive. So these are all the classes of models that we look at. And then these are the results that we have. So we look at the well-structured problem and the strong well-structured problem for all of these classes. So it turns out well-structured problem is quite hard. It is undecidable for most of the classes that we look at. But if you do have decidability for this model, which is one Avass, we have one counter and affine transitions. And the results highlighted are the ones I'll be discussing in the stock. For the other results, you can check out the paper. And okay, so I'll get the strong well-structured problem out of the way first. So it turns out a strong well-structured problem is decidable for all classes because strong well-structuredness is sort of a local property. If there's a one-shape transition, then we want another one-shape transition. And that is Pressburger Expressible. So we can check validity of that formula and you can decide it for all classes. The well-structured problem on the other hand is quite hard. So okay, so first we look at this result that given one PCM, we'll restrict it to one counter with Pressburger transitions. We'll show the undecidability of the problem. Okay. So the undecidability, the reduction goes from Minsky machine reachability, right? So given a Minsky machine, we'll construct a one-counter PCM such that it is well-structured if and only if all states are reachable in the Minsky machine, right? And so here we have just one counter in our counter machine, in our Pressburger machine, whereas we have two counters. So basically we encode it using the Godel encoding, whereby we store the values of the counters in the exponents for two and three, right? So note that this allows us to multiply by arbitrary constants, arbitrary large constants, and that is sort of key for getting the reduction, right? So since the other factors don't matter, we only care about the exponent of two and three, we can define sort of an equivalence relation on the configurations of the one PCM, where two values of the counter are equal if the exponent of two and three are the same, right? So now I'll just show the reduction on an example. So suppose this is the Minsky machine that we have with two counters, C1, C2, and you have some, this thing. So the corresponding one PCM will sort of simulate the Minsky machine with the Pressburger machine. So you start with the same set of states, then you add the corresponding relations which simulate the counter operations. So for instance, incrementing the first counter corresponds to incrementing the exponent of two. So you multiply by two here. Similarly, decrementing corresponds to division. Now these are not Pressburger formula, but you can write equivalent Pressburger formula. So that's fine. And zero test corresponds to checking divisibility by two. So this is the guards that you can have guards like this, right? And so this is not sufficient. This is just a simulation of this thing. And then we add two more classes of transitions, yeah. So when we add the red transitions, so from every state to the initial state, we add a transition labeled by this formula phi. So what phi does is, it allows you to jump back to the initial state while resetting the exponent of two and three. So you can jump to any value which is not divisible by two and three. So this sort of corresponds to like a counter reset and since we're going back to the initial configuration and resetting a counter, this does not affect the reachability relation in the simulation that we have, right? But it does allow you to jump to arbitrarily large values and that is sort of key. So if you add these transitions, it gives you this property that if all states in M are reachable, then N will be a well-structured transition system. And the way to see that is, suppose I want to reach from Q1 to Q2 and I want to cover Q2, N, for instance, then what I can do is I can jump from Q1 to Q0 with an arbitrarily large value, which is greater than N. And then since Q2 will be reachable in Q0 by the hypothesis, then I can just follow that reachability path and I will get a larger value than N. So if all states in M are reachable, then N will be a well-structured transition system if I add these transitions. And the second class of transitions that we add is, it's simple, it only allows the transition if both initial and the final values are zero. Now, note that here our initial value will be one and no transition allows you to reach a zero, your counter value to be zero, right? Because you only have division, multiplication and checking for divisibility and so on, right? So the blue transitions, they can never actually be taken in the counter machine. However, they give you the property that if this is well-structured, then all states will be reachable. And that is also easy to see because suppose, because you have Q0 to Q10, right? And therefore, if N has to be a well-structured transition system, then if you start from Q0, 1, which is the initial configuration, then there should be a way to reach Q1. And same for all the other states. So upon adding the blue transitions, you get the property that if this is a well-structured transition system, then all the states have to be reachable. So this is the reduction that we have. And so what we've shown is we've taken a Minsky machine and converted it to a one PCM, such that this is a well-structured transition system if and only if all states here are reachable. So that gives you that the problem is undecidable for one PCM, right? And the same is true for all these other classes. The proofs get sort of complicated, but the idea is the same, so you can check it out, right? So the well-structured problem is also undecidable for functional one PCMs. Note that this reduction is not functional because the formula phi is not a function. It is independent of the input, right? But there's a way to do it such that you get undecidability for functional one PCMs as well. Then for two counter-Minsky machines then two hours also you get undecidability, right? So right now we just proved this result, the undecidability of the problem for one PCMs, right? And now we look at the one, the decidability result for one hours, okay? So I'll go over the model quickly once again. So the model is this, you have one counter and all your transitions look like x prime equals A x plus B, some linear thing. And A and B can obviously be not negative or whatever, so this is the model. Again, this is the example that we'll use. So note that this is not, this is stronger than a VAS because in vector addition systems you can't have transitions like this. You can't have 19 minus x. So these are not just translations, you can have negative transitions as well, right? And so one of us have the following properties that they have been studied before unsurprisingly. So reachability and coverability are decidable which was shown in a paper in 2013. But what we do is we come up with an algorithm which can take a configuration and compute the pre-star of that configuration. By pre-star I mean the set of configurations can reach this configuration. So we show that this set itself is also computable. So if you have this then obviously you can see that reachability and coverability are decidable because you can just check membership in the set and so on. And not only is it computable, it is also presberber-expressible this set. And we use this property that the pre-star set is computable to come up with the decidability result for the well-structured problem. We'll see how, right? So the pre-star algorithm, the one which computes the pre-star. So suppose you want to compute the pre-star of QF and NF, the configuration QF and F, then well you see some things that these are some of the key observations which allow you to get the algorithm to work. And the first thing is that the set will always be presberger-expressible. So if you try to compute it with a presberger formula, that is sufficient. Like you won't keep discovering new values and so on. The second is that given a cycle in a one-averse, you can compute sort of the back acceleration of it. So what I mean by that is you can compute all the sets, all the configurations, which can reach your configuration while using the cycle sum arbitrary number of times, right? And the third thing is that computing these back accelerations is sufficient. That is like if you're, so our algorithm is a backtracking algorithm. And if you keep backtracking like this, then you will eventually compute the entire reach a pre-star set. That is you cannot get into a state where you keep backtracking and you keep discovering more and more values. Like that won't happen, the computation will stop. And these are sort of the main things. And I mean, we prove them, they're not, they're sort of tricky to prove, but yeah. And once you have these things, then the algorithm is the simplest thing that you can think of. That is you store a presberger formula for each state and then you just backtrack. And from results like this, we know that that is sufficient. So we'll compute all the back accelerations of the cycle and given a transition, we'll just compute the backtrack from that. And that is sufficient. So proving that termination and so on is slightly wonky, but yeah. So okay, that is the main thing. So I'll just run the algorithm on an example to give you. Okay, so suppose I want to compute pre-star of Q119. So we start with formula phi one and phi two for states Q1 and Q2, right? And we initialize phi two as bottom and phi one is N equals 19 because you want to reach Q119. Then if we compute the back acceleration of this cycle, we'll get 19 and zero because zero can also take it. And if we compute the back from this, we'll get 19 and zero in this, in phi two. Because from Q2, you can start with 19 or zero and reach the configuration that you want, right? And then if we compute back accelerations of the cycle, then we will get this. That any value which is greater than 19 and which is one mod three, you can take this cycle arbitrarily many times and you can again reach this thing, right? And then we just keep going, we take this. So the values here get translated and you get them in phi one because of this transition. And then yeah, you just keep going. And then yeah, eventually you'll get to a state where backtracking from anywhere won't get you new values and that is when you stop, right? This is the algorithm which computes the pre-star. Okay, so now we just were at the well-structured problem. So the result is that the problem is decidable and the way we show that is, okay, so given a transition, if the transition is a translation, like if it's a positive transition, that is, okay. So by a positive transition, I mean one where A is greater than equal to zero, like X prime equals AX plus B. If A is positive, I call it a positive transition. And the result and the thing is positive transitions are already monotone. That is if you can go from some counter value and using that and you start with some bigger counter value, then you can already reach a bigger value. So that is fine, like that won't violate well-structuredness, right? But for negative transitions, we make the observations. So for instance, if this is a negative transition, then if you start with Q one zero, then you can reach Q two five, right? So for this thing to be well-structured, what that means is, if you start from Q one comma any number N, then you should be able to reach something greater than five, right? And the way we formulate that is that if we compute the pre-star of upward closure of Q two comma B, then Q one cross N should be a subset of that. That is from any Q one comma any number, you should be able to reach this set, Q two comma upward closure of B. And this is obviously necessary for it to be well-structured. Turns out this is also sufficient. So the decidability result is as follows. You look at all the negative transitions in your transition system, and then you check that all of them should satisfy this property. That if this is the negative transition, then this should be the case. And if that is the case, then the transition system will be well-structured. And so that allows us to decide well-structuredness. So that is all I have. And so some further questions that need to be explored are. So the complexity analysis of the problem. Like we have a pre-star algorithm, but getting the complexity bounds in that is slightly hard, we're still looking at it. So that is one thing that can be done. And the other thing is, of course, extending the problem to other models. That you can look at the same problem, well-structured problem, for push-down machines, T4 automata, exchanges of petrinets, and so on. So these are things that we're working on right now. And that's all. For well-structured position system, there is a sort of variant for the future. Look at the somehow stronger, for instance. You can see the well-step between well-step. And I can see the way to the well-step. Look at the name of this. I mean the resolution of the star. That is a strong way. So for strong property, I think the vis-à-vis the structure, vis-à-vis the other. Yeah, so the stronger structured property is decidable for everything. And we will do that as we encode it as a formula. So if you look at the machine, somehow you extend the semantics of the automata to show a condition relation, given by a representative formula. But the relation of configuration, the way it is sent is component-wise, component-wise, or component-wise, or component-wise. And then it's possible to replay this relation by a presclerger to find another relation. The question is, does there exist a presclerger formula so that your system is from your resolution? So if you have a presclerger in the machine, you would like to know if it's a strong waste structure, but not for the usual order, because maybe it's a strong general, a strong space. But for another one, it's explicit in the presclerger logic. So actually, that is something that we started looking at. We don't have any results like this, but yeah, that is something that can be done. We don't have any results like this. That's the forward direction also, the post. So the post thing will not be presclerger-expressible because you can simply have some loop which is multiplied by 2, right? And that will be the power of 2 which is not presclerger-expressible. So the post star is not presclerger-expressible, so I don't know that. But pre-star certainly is. That's why we looked at pre-star instead of post star. Thank you.