Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constants (true/false) in FormulaNode #174

Closed
jurajsic opened this issue Feb 7, 2023 · 4 comments · Fixed by #330
Closed

Constants (true/false) in FormulaNode #174

jurajsic opened this issue Feb 7, 2023 · 4 comments · Fixed by #330
Assignees
Labels
For:library The issue is related to library (c++ implementation) Priority:low Work on this only when there is nothing else to do. Type:suggestion A suggestion for feature/change that is not necessary at this moment

Comments

@jurajsic
Copy link
Member

jurajsic commented Feb 7, 2023

Currently the constants true/false are not represented in FormulaNode in any way and to check if it is there, we need to check for the name of the node. In #169 I added function is_constant(), is_true() and is_false(), but they also only check for the name of the node. Maybe we should add an option to enum of the node representing a constant operand true/false.

@jurajsic jurajsic added For:library The issue is related to library (c++ implementation) Type:suggestion A suggestion for feature/change that is not necessary at this moment Priority:low Work on this only when there is nothing else to do. labels Feb 7, 2023
@martinhruska
Copy link
Member

Agree, add it as an option to enum.

@jurajsic
Copy link
Member Author

jurajsic commented Feb 8, 2023

We will add true/false to enum. What is needed to be done:

  1. Fix parsing from .mata format to IntermediateAut so that \true/\false (according to true/false in mata format #168) is saved into node with correct option in enum.
  2. Change functions is_constant(), is_true() and is_false() to check for the enum.
  3. Check if we need to add checks for constants in current code whenever IntermediateAut is used. Probably in Nfa::construct(), Afa::construct() and in mintermization.

@Adda0
Copy link
Collaborator

Adda0 commented Jul 26, 2023

@jurajsic What is the status of this issue? Considering we are revising the Mata file format, we should also have a look at this issue.

@jurajsic
Copy link
Member Author

Haven't touched it at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For:library The issue is related to library (c++ implementation) Priority:low Work on this only when there is nothing else to do. Type:suggestion A suggestion for feature/change that is not necessary at this moment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants