Deliverable-4
To Implement Finite Automata Closure Algorithm
- I made changes to my project property file.
- As professor suggested me, I removed negative variable list from the rules of program.
- I added various models for the program. Each model contain Regular Expression.
- I altered rules of the program. I added constraints in the rules.
- For example, 34R0 where 34 is a string which contains 0 or 1 value for x3 and x4 variable and R0 is a regular expression.
- Each rule contains head,variable list and constraints variable list.
- For Example, x1:x2|34R0 where x1 is head,x2 is variable and 34R0 is constraint.
Parse Constraints List
- function parseConstraintsList parse constraints of the rules
- It stores these constraints in list.
- I removed function parseNegVarlist as we do not care about negative variable list.
Example-1
prop.properties file :
R0=0*
R1=1*
rule[0]=x2:|43R0;
rule[1]=x2:x3|14R0;
Output
For i=0
Stable Model does not Exist
For i=1
Stable Model does not Exist
For i=2
Stable Model does not Exist
For i=3
Stable Model does not Exist
For i=4
Stable Model does not Exist
For i=5
Stable Model does not Exist
For i=6
Stable Model does not Exist
For i=7
Stable Model does not Exist
For i=8
Stable Model Exist
Example-2
prop.properties file:
R0=0*1?
R1=1*01
rule[0]=x1:|43R0;
rule[1]=x2:x3|213R0,34R1;
Ouput
For i=0
Stable Model does not Exist
For i=1
Stable Model does not Exist
For i=2
Stable Model does not Exist
For i=3
Stable Model does not Exist
For i=4
Stable Model Exist
|