-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented TauActions, and committed states.
The CompositionFunction has been updated to use committed states, as well as ignore modalities. This is useful for model checking, to use the properties to specify the behaviour of the automaton in a top-down way. The converter now also reads committed states. CALabel has been updated. There are also some temporary attempts, classes that probably will be removed in the future, like HideNecessaryModality.java and DkBricsEncoder.java Signed-off-by: Davide Basile <davide.basile@isti.cnr.it>
- Loading branch information
1 parent
68e5689
commit 0e22810
Showing
31 changed files
with
1,288 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/main/java/io/github/contractautomata/catlib/automaton/label/action/TauAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package io.github.contractautomata.catlib.automaton.label.action; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* Class implementing a request action. | ||
* | ||
* @author Davide Basile | ||
*/ | ||
public class TauAction extends Action { | ||
|
||
/** | ||
* Constant symbol denoting a tau move | ||
*/ | ||
public static final String TAU="tau_"; | ||
|
||
/** | ||
* Constructor for a tau action | ||
* @param label the label of this action | ||
*/ | ||
public TauAction(String label) { | ||
super(label); | ||
} | ||
|
||
|
||
/** | ||
* Print a String representing this object | ||
* @return a String representing this object | ||
*/ | ||
@Override | ||
public String toString(){ | ||
return TAU+this.getLabel(); | ||
} | ||
|
||
|
||
/** | ||
* A tau action matches no action. | ||
* @param arg the other action to match | ||
* @return true if this actions matches arg | ||
*/ | ||
@Override | ||
public boolean match(Action arg) { | ||
return false; | ||
} | ||
|
||
|
||
/** | ||
* Overrides the method of the object class | ||
* @return the hashcode of this object | ||
*/ | ||
@Override | ||
public int hashCode() { | ||
return Objects.hash(TAU+this.getLabel()); | ||
} | ||
|
||
|
||
/** | ||
* Overrides the method of the object class | ||
* @param o the other object to compare to | ||
* @return true if the two objects are equal | ||
*/ | ||
@Override | ||
public boolean equals(Object o) { | ||
return super.equals(o); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.