-
Notifications
You must be signed in to change notification settings - Fork 0
Home
At its heart, html-logic-tree was written to quickly and easily display Boolean Expression Trees in html webpages. The project currently supports all versions of HTML but has different levels of success on the different browsers.
A Boolean Expression Tree is what the computer generates to understand a statement like:
True and False
or:
A and (B or False and Maybe)
You may have noticed that we have a Maybe ‘Boolean’ type. Now maybe is not a boolean type but the project supports it so that you can treat all unknown variables as ’maybe’s. This has very useful properties but some extra rules need to be defined.
We currently only have two operators ‘And’ and ‘Or’ that the code understands and any future commands (like XOR) will just be converted into and’s and or’s anyway so here are the evaluation trees for Maybe:
And (A and B => C)
|A|B|C|
|True|Maybe|Maybe|
|Maybe|True|Maybe|
|False|Maybe|False|
|False|Maybe|False|
Or (A or B => C)
|A|B|C|
|True|Maybe|True|
|Maybe|True|True|
|False|Maybe|Maybe|
|False|Maybe|Maybe|
So as you can see logical operations still ‘short-circuit’ but otherwise they move towards ‘maybe’.
For those people that do not wish to download the code but do want too the code in action, or simply want to see a working version since they are having problems then please go to the online working version of the code
There is a Simple Five Minute Example that you can go take a look at if you want to get started in five minutes. Follow it an be on the road to using it in an instant.
The code has been written so that it can be easily overwritten. You can find out how to overwrite the Settings or how to Extend The Code.