How to identify deadlock conditions in the model containing infinite domain variable? - model-checking

"check_fsm" command is used in nuxmv shell for checking deadlock conditions in model containing finite domain variables. But in case of models containing infinite domain variables like integers with no range or real variable the model can't be built with "go" command. How can we check for deadlock with "go_msat" command for building the model and further analysis.

Related

What do we mean by 'register' in PyTorch?

I am not asking about registers which are memory locations to store the content.
I am asking about the usage of word 'register' in PyTorch documentation.
While I am reading the documenation regarding MODULE in PyTorch, I encountered the usage of word registers, registered several times.
The context of usage is as follows
1. tensor (Tensor) – buffer to be registered.
2. Submodules assigned in this way will be registered, and will have their parameters converted too when you call to(), etc.
3. Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
4. Registers a backward hook on the module.
5. Registers a forward hook on the module.
.....
And the word 'register' has been used in the names of several methods
1. register_backward_hook(hook)
2. register_buffer(name, tensor, persistent=True)
3. register_forward_hook(hook)
4. register_forward_pre_hook(hook)
5. register_parameter(name, param)
......
What does it mean by the usage of word register programmatically?
Does it just mean the act of recording a name or information on an official list as in plain English or has any significance programmatically?
This "register" in pytorch doc and methods names means "act of recording a name or information on an official list".
For instance, register_backward_hook(hook) adds the function hook to a list of other functions that nn.Module executes during the execution of the forward pass.
Similarly, register_parameter(name, param) adds an nn.Parameter param with name to the list of trainable parameters of the nn.Module.
It is crucial to register trainable parameters so pytorch will know what tensors to pass to the optimizer and what tensors to store as part of the nn.Module's state_dict.

Extract information from a string - What technique in ML can solve

I would like to know what kind of technique in Machine Learning domain can solve the problem below? (For example: Classification, CNN, RNN, etc.)
Problem Description:
User would input a string, and I would like to decompose the string to get the information I want. For example:
User inputs "R21TCCCUSISS", and after code decomposing, then I got the information: "R21" is product type, "TCC" is batch number, "CUSISS" is the place of origin
User inputs "TT3SUAWXCCAT", and after code decomposing, then I got the information: "TT3S" is product type, "SUAW" is batch number, "X" is a wrong character that user input , and "CCAT" is the place of origin
There are not fix string length in product type, batch number, and place of origin. Like product type may be "R21" or "TT3S", meaning that product type may comprise 2 or 3 character.
Also sometimes the string may contain wrong input information, like the "X" in example 2 shown above.
I’ve tried to find related solution, but what I got the most related is this one: https://github.com/philipperemy/Stanford-NER-Python
However, the string I got is not a sentence. A sentence comprises spaces & grammar, but the string I got doesn’t fit this situation.
Your problem is not reasonnably solved with any ML since you have a defined list of product type etc, since there may not be any actual simple logic, and since typically you are never working in the continuum (vector space etc). The purpose of ML is to build a regression function from few pieces of data and hope/expect a good generalisation (the regression fits all the unseen examples, past present and future).
Basically you are trying to reverse engineer the input grammar and generation (which was done by an algorithm, including possibly a random number generator). But in order to assert that your classifier function is working properly you need all your data to be also groundtruth, which breaks the ML principle.
You want to list all your list of defined product types (ground truth), and scatter bits of your input (with or without a regex pattern) into different types (batch number, place of origin). The "learning" is actually building a function (or few, one per type), element by element, which is filling a map (c++) or a dictionary (c#), and using it to parse the input.

Including only certain features when running deep feature synthesis?

For example one of my entities has two sets of IDs.
One that is continuous (which apparently is necessary to create the EntitySet), and one to use as a foreign key when merging with my other table.
This results in featuretools including the ID in the set of features to aggregate. SUM(ID) isn't a feature I am interested in though.
Is there a way to include certain feature when running deep feature synthesis?
There are three ways to exclude features when calling ft.dfs.
Use the ignore_variables to specify variables in an entity that should not be used to create features. It is a dictionary mapping an entity id to a list of variable names to ignore.
Use drop_contains to drop features that contain any of the strings
listed in this parameter.
Use drop_exact to drop features that exactly match any of the strings listed in this parameter.
Here is a example usage of all three in a ft.dfs call
ft.dfs(target_entity="customers"],
ignore_variables={
"transactions": ["amount"],
"customers": ["age", "gender", "date_of_birth"]
}, # ignore these variables
drop_contains=["customers.SUM("], # drop features that contain these strings
drop_exact=["STD(transactions.quanity)"], # drop features named exactly this
...
)
These 3 parameters are all documented here.
The final thing to consider if you are getting features you don't want is the variable types of the variables in your entity set. If you are seeing the sum of an ID variable that must mean that featuretools thinks the ID variable is a numeric value. If you tell featuretools it is an ID it will not apply a numeric aggregation to it.

How to interpret the Result of msat LTL commands of NuXMV

I am using NuXMV for checking LTL properties using msat_check_ltlspec_bmc command on a fairly large model. The result shows no counterexample found within the given bounds. Do I interpret it as that property is True. Or it can alternatively mean that analysis is not complete.
This is because, by changing the property proposition to true or false, the result is always no counterexample. Most of The results are counterintuitive.
Started with real variables based properties but since unable to understand the result, shifted to Boolean based properties on the same model, using the same command.
Bounded Model Checking is a bug-oriented technique which checks the validity of a property on execution traces up to a given lenght k.
When an execution trace violates a property, great: a bug was found.
Otherwise, (in the general case) the model checking result provides no useful information and it should be treated as such.
In some cases, knowing additional information about the model can help. In particular, if one knows that every execution trace of length k must loop-back to one of the k-1 states, then it is possible to draw stronger conclusions from the lack of counter-examples of length smaller or equal k.

How to represent repetition of activities in Activity Diagram

I have a situation in which, for a given number, I have to repeat a couple of activity for as many time as the given number is. How can I represent this situation in UML using Activity Diagram? I thought I could use expansion regions but I can't figure out how.
The most basic way to is a loop showing the repetition: use a decision node and a flow looping back to a merge node.
Alternatively, you could represent the loop with an expansion region. Use the keyword <> and expansion nodes to link the inside of the region and its outside. You can find an example in section 6 of this article
However, in principle an expansion region is used to process a collection in input:
If the value is iterative, the expansion executions must occur in
an iterative sequence, with one completing before another can begin.
The first expansion execution begins immediately when the
ExpansionRegion starts executing, with subsequent executions starting
when the previous execution is completed. If the input collections
are ordered, then the expansion executions are sequenced in the order
induced by the input collection. Otherwise, the order of the expansion
executions is not defined.

Resources