Blawx Documentation Specific Blocks

Facts and Assumptions


A “Fact” in Blawx represents a thing that is known with certainty. If you have a fact, you need to put it in a Fact block, which looks like this:


Generally speaking, most of the code that you use to create categories, to create attributes, and to create objects, will be included in a fact block.

Fact blocks are also used in tests to set out the fact scenario for that test, if any.

Generally speaking, it does not make sense to use variables other than "any" in a fact block. This is because facts are interpreted by Blawx as rules with the condition "always". Imagine, for example, that you made the statement that the variable X is a dog in a fact block, like this:

Bad Fact

That will get interpreted by Blawx as "everything is a dog". That's probably not what you meant. The only thing that a variable can mean, inside a fact block, is "everything". There are a few cases where it might be reasonable to make that kind of statement, but for the clarity of your code it makes to include those statements as rules, so that it is obvious that it is an inference that applies to anything.

It can be helpful to create separate Fact blocks for pieces of information that you will be working with at the same time, so that when you are not using them you can Collapse and Disable the fact block and all its contents all at once. See the documentation on the Blawx User Interface for details on collapsing and disabling blocks.

If you ask Blawx whether or not something is true that you have stated as a Fact, the answer is always yes, without further explanation.