This library provides predicates for tuning FASILL programs.
Typically, a programmer has a model in mind where some parameters have a clear value. For instance, the truth value of a rule might be statistically determined and, thus, its value is easy to obtain. In other cases, though, the most appropriate values and/or connectives depend on subjective notions and, thus, programmers do not know how to obtain these values. In a typical scenario, we have an extensive set of expected computed answers (i.e., test cases), so the programmer can follow a "try and test" strategy. Unfortunately, this is a tedious and time consuming operation. Actually, it might even be impractical when the program should correctly model a large number of test cases.
For tuning a symbolic program, we don't follow an inefficient, basic method based on applying each symbolic substitution to the original symbolic program and then fully executing the resulting instantiated FASILL programs. Instead of it, we have implemented a thresholded symbolic strategy where symbolic substitutions are directly applied to sfca's (thus, only the interpretive stage is repeatedly executed) and many useless computations are prematurely disregarded by appropriately using dynamic thresholds.
This predicate succeeds when Substitution is the best substitution found so far and Deviation is the deviation with respect to the set of test cases.
This predicate succeeds when Symbols is the set of symbolic constants contained in the FASILL rules asserted in the current environment.
This predicate succeeds when Symbols is the set of symbolic constants contained in Expression.
This predicate succeeds when Symbols is a set of symbolic constants and Substitution is a possible symbolic substitution for constants Symbols. This predicate can be used for generating, by reevaluation, all possible symbolic substitutions for the constants.
This predicate succeeds when ExpressionOut is the resulting expression after applying the symbolic substitution Substitution to the expression ExpressionIn.
This predicate succeeds when the lists of goals Preconditions is satisfied for the symbolic substitution Substitution.
This predicate succeeds when ?Sets is the list of disjoint sets of test cases loaded into the current environment, in form of pairs Symbols-SFCAs.
This predicate succeeds when ?UnionFindOut is the resulting union-find structure of join all the sets in the list of symbols ListSymbols, starting with the union-find structure UnionFindIn.
This predicate adds the items of the list ItemsBySymbols to the ItemsBySymbolsIn list, producing the ItemsBySymbolsOut list. Items are pairs of the form Symbols-Object, and are classified by Symbols.
This predicate adds the item ItemBySymbols to the ItemsBySymbolsIn list, producing the ItemsBySymbolsOut list. Item is a pair of the form Symbols-Object, and is classified by Symbols.
This predicate succeeds when Substitution is the best symbolic substitution for the set of test cases loaded into the current environment, with deviation Deviation.
This predicate succeeds when Substitution is the a symbolic substitution for the set of test cases loaded into the current environment, with deviation Deviation less than or equal to Cut. If Cut is set to 0.0, Substitution is the best symbolic substitution.
This predicate succeeds when Substitutions is the list of best symbolic substitutions for the sets of test cases Test, with deviations Deviations.
This predicate succeeds when Substitution is the best symbolic substitution for the set of test cases loaded into the current environment, with deviation Deviation. Tests is the set of test cases with goal partially executed.
This predicate writes a FASILL symbolic substitution Substitution for the standard output.