Bram-Hub / LEGUP

Logic Engine for Grid-Using Puzzles - a better way to learn formal logic
GNU General Public License v3.0
33 stars 82 forks source link

[ENHANCEMENT] Add more flag options for Short Truth Table files #446

Open charlestian23 opened 1 year ago

charlestian23 commented 1 year ago

Describe the current behavior of what you're trying to improve. If your enhancement request related to a problem, please also describe the problem.

In Short Truth Table files, there is a flag normal that can be set to true or false. See the following screenshot below: image

When this flag is set to true, the statements are interpreted to form an argument: the last one is the conclusion, and all others are premises, and the student has to check if the argument is valid or not, by seeing if it is possible to make the premises all true and the conclusion false ... so with the "normal" setting, LEGUP will set the last statement to False, and all others to Green.

The drawback is that with this, you can effectively only checking the validity of an argument. What if we want to check some set of statement for consistency (now you should set all statement to True)? Or whether some statement is a tautology (now you set that one statement to false)? Or ...?

Describe the improvement you'd like

Consider changing the flag name to something like type. This flag can be set to values like consistency or tautology or contradiction, etc., and each of these flags can do something different to the files.

Describe alternatives you've considered

No response

Additional Context

No response

Bram28 commented 1 year ago

See #74 : When the old 'normal' flag was set to false, you can 'manually' indicate truth-values. For example, the input file could reflect something like:

P->Q ; T P ; T Q ; F (this would be the typical set-up for checking the validity of an argument)

Or:

P->Q ; T P ; T Q ; T (for consistency checking)

But it could also be:

P->Q ; T P ; T Q ; (so we could use that to figure out the truth-value of a statement whose truth-value is initially unknown)

Or whatever the user wants!

I definitely do not want to lose this ability to manually set truth-values in the file when changing the 'normal' flag to a 'type' flag. Maybe if we set the 'type' to 'custom' you can do this manual thing?