logic_parser_aux: auxiliary routines for logic basic routines
logic_parser_globals: global variables for logic parser and other basic packages
logic_syntax_analysis_pak: syntax_analysis routines for logic system
along with a driver for testing some of the procedures exported by these packages. No procedure is exported by
logic_parser_globals; the following procedures are exported by logic_parser_aux:
build_model(membs_inv,givn_vars,sorted_membs): build a model for a saturated set of memberships
set_rep(n): returns the set representation of an integer (memoized using globals)
and the following procedures (listed alphabetically) are exported by logic_syntax_analysis_pak:
find_all_vars(node): find all the variables in a formula
find_bound_vars(node): find the bound variables at the top of an iterator tree
find_bound_vars_test(): test the 'find_bound_vars' operation, for setformer and iteration nodes
find_free_vars(node): find the free variables in a tree (main entry)
find_free_vars_from(node,bound_vars): find the free variables in a tree (alternative main entry, used by blob_to_monotone)
find_free_vars_in(node,bound_vars): find the free variables in a tree (recursive workhorse)
find_iterators(node): find the iterator list at the top of an iterator tree
find_repmap(equalities): find repmap for a set of equalities
flatten_existential(node): get the chain of all existential quantifiers starting at a given node a first existential appears
flatten_same_ops(node): get the chain of all identical infix operations starting at a given node at which this operation appears
flatten_universal(node): get the chain of universal quantifiers starting at a given node a first universal appears
gen_name(rw name_ctr): generate a new blob name
get_blob(stg): once a tree has been blobbed to a structured string, this routine looks it up in the collection of all such strings, to determine its blob number
handle_quant_clause(tree1,tree2): finds the substitution, if any, that generates formula 2 from formula 1
init_logic_syntax_analysis(): initialize for logic syntax-tree operations
make_clause(vars_and_ranges,clause): creates a quantified equivalence/equality clause prefixed by a given set of quantifiers
mlss_decider(truth_value,td_params): tableau-based term decider for mlss
model_blobbed(formula): models a blobbed mlss formula, or pronounces it unsatisfiable by returning OM
new_name(stg,nameset): generates new names for bound variables during a simplification operation
parze_expr(stg): print source; then parse
post_monotone(op_and_arg_string): note the monotonicity property of one or more function symbols
prant(stg): auxiliary compressing print
reduce_by_repmap(items,repmap): reduce a set of tuples using a repmap
show_map(map): print of variable-to_expression map provided by 'verify_instance'
simplify_setformer(tree,iterator_indices): removes specified membership iterators over setformer expressions
small_mlss_test(): initial explicit test of mlss decider
standardize_bound_vars(formula): standardize the bound variable names in a formula
standardize_bound_vars_noad(formula): standardize the bound variable names in a formula, restarting bound variable names counter
standardize_formula(poly_tree,op_obj_tup): standardizes a polynomial tree belonging to a specified algebraic theory
substitute(tree,substitution_map): makes substitutions for specified free variables of a formula. (main entry; uses workhorse)
substitute_in(tree,substitution_map,bound_vars): inner recursive workhorse of substitution routine
substitution_test(): substitution test
test_algebra(): inital tests of ALGEBRA deduction
test_basic_parses(): view parse trees of basic constructions
test_blob_to_monotone(): test the blob_to_monotone routine
test_blob_to_string(): tests of blob_to_string function
test_blobbing(): test the blob_tree function
test_boil_down_blobbed(): test overall simplification of blobbed expression
test_bool_exp(stg,fcn): check agreement of davis_putnam and truth-table for 4-variable boolean expressions
test_build_quantified(): test of 'build_quantified_version' routine
test_count_free_vars(): test of count_free_vars routine
test_Davis_Putnam(): test the Davis_Putnam propositional decision algorithm
test_equality_inference(): inital tests of equality inferencing
test_equality_more(): supplemental equality tests
test_exploit_prop_signs(): test of search routine exploiting propositional variables of one sign
test_find_diffs(): test of 'find_diffs' procedure
test_find_prop_signs(): test of search routine for propositional variables of one sign
test_mls(): Eugenio's collection of MLS tests
test_model_blobbed(): inital tests and timing of the mlss verifier
test_simplify_builtins(): test of special simplifications for builtin operators
test_simplify_onces(): test of special simplifications for variables appearing once
test_simplify_setformer(): test the simplify_setformer routine
test_top_sort_stgs(): test the top_sort_stgs function
test_verify_instance(): inital tests of 'verify_instance' procedure
timing_tests(): a few tests of MLSS timing
top_sort_stgs(G): topological sorting procedure. G is a dependency graph for a set of strings; used to sort iterators
unparse(tree): puts a tree back into string format
unparse_in(tree): puts a tree back into string format
unparse_test(): test unparse operation
verify_equality(tree1,tree2,context,is_pred): verifies equality or equivalence of two formulae (main entry)
verify_equality_in(tree1,tree2,bound_vars_with_ranges,context,is_pred): verifies equality or equivalence of two formulae (workhorse)
verify_instance(tree1,tree2): finds the substitution, if any, that generates formula 2 from formula 1 (main entry)
verify_instance_in(tree1,tree2,inv,inuni,frozen): finds the substitution, if any, that generates formula 2 from formula 1 (workhorse)
Additional procedures in the package logic_syntax_analysis_pak, not exported, are (listed alphabetically):
add_memb(x,y): respond to the appearance of a new membership relation 'x in y'
add_nonmemb(x,y): respond to the appearance of a new nonmembership relation 'x notin y'
algebra_blob_in(formula): recursive workhorse for algebra bolobbing; builds blobbed_formula and global algebra_blobs_map
algebra_get_blob(stg): once a tree has been blobbd to a structured string, this routine looks it up in the collection of all such strings,
atom_stg(x): converts atom to string
atom_with_meaning(tup): find or form an atom with the specified meaning
atom_with_set_meaning(tup): find or for an atom with the specified set-value meaning
atom_with_sp_set_meaning(tup): find or for an atom with the specified set-value meaning
blob_and_check(a1,a2,op_obj_tup,context): perform blob_and_check test in specified theory
check_definition(tree,symbols): check a recursive or nonrecursive definition for validity
check_match_to_vars(tree1,tree2,frozen): check identity of strings after matching of free vars (main entry)
check_match_to_vars_in(tree1,tree2,bound_vars): check identity of strings after matching of free vars (workhorse)
check_pred_definition(tree,statement,symbols): checks skolem-type definition for validity
count_free_vars(node): find and count the free variables in a tree (main entry)
count_free_vars_in(node,bound_vars,parent_context): find and count the free variables in a tree (recursive workhorse)
decompose_in(formula,is_prop): recursive inner workhorse for formula decomposition
deduce_from_neg_memb(x,y): make all deductions from a positive membership relation 'x notin y'
deduce_from_pos_memb(x,y): make all deductions from a positive membership relation 'x in y'
defmemb(tree1,tree2,substitution_map): check validity of a defmemb deduction involving a quantified statement or a set membership relation
DP_biased_pos(term,unsatisfied_clauses,singles,one_sign,undefined_terms,num_undefined_terms,clauses_with_term_pos,clauses_with_term_neg,truth_value):
this 'recursion header' routine exists only to ease recovery from the changes it makes, if it fails
DP_in(unsatisfied_clauses,singles,one_sign,undefined_terms,num_undefined_terms,clauses_with_term_pos,clauses_with_term_neg,truth_value):
inner workhorse of the Davis-Putnam procedure, this procedure returns a satisfying model, if any can be found; otherwise OM
evaluate_poly_in(poly_tree): recursive evaluation of a standardized polynomial tree
exploit_prop_signs(node): use the signs of propositional variables to simplify (main entry)
exploit_prop_signs_in(node): use the signs of propositional variables to simplify (workhorse)
find_mlss_model(op_app_0,op_app_1,op_app_2,only_membr,pos_membrs,neg_membrs,pos_membrs_inv,neg_membrs_inv,unprocessed_membrs,incs_apps_1,incs_apps_2,unres_alts,singletns): find a model of a predigestd set of mlss clauses
find_mlss_model_with_new(new_pos_cl,new_neg_cl,op_app_0,op_app_1,op_app_2,only_membr,pos_membrs,neg_membrs,pos_membrs_inv,neg_membrs_inv,unprocessed_membrs,incs_apps_1,incs_apps_2,unres_alts,singletns): variant of find_mlss_model; processes 1 or 2 new clauses at very start
find_prop_signs(node): find the signs of propositional variables if these are definite (main entry)
find_prop_signs_in(node,psgn): find the signs of propositional variables if these are definite (recursive workhorse)
looky(x): for debugging
lpa(): conditional left parenthesis
match_to(tree1,tree2): tree matching algorithm, biases toward sustitutions in tree1 (main entry)
match_to_in(tree1,tree2,bound_vars): tree matching algorithm, biases toward substitutions in tree1 (workhorse)
maytrace(n): debugging auxiliary
next_vect(v,limit): increments a vector of integers, up to the final vector [limiit,limit,...]
newblob(stg):
num_exact_iter_matches(iters1,iters2,inuni,frozen): find the number of exact matches in two iterator sequences (existential case)
range_blob(node): this blobs a set expressions and quantifiers down functions involving basic set-theretic operators
reverse_context(parent_context): reverses = to /=, in to notin. Returns OM otherwise
remove_clause(clause,rw unsatisfied_clauses,rw clauses_with_term_pos,rw clauses_with_term_neg,rw one_sign): used to remove a clause which has been satisfied
replace_symbols(stg,replacement_map): replace specified letters by corresponding range elements
rpa(): conditional right parenthesis
simplify_builtins(tree): simplifies various expressions involving built-in operators
simplify_builtins_in(tree): workhorse: simplifies various expressions
simplify_onces(tree): equisatisfiability simplification for variables occurring only once
simplify_onces_in(tree): equisatisfiability workhorse for variables occurring only once
special_bigger_op(bigop,op): special processing for pair of monotone operators in known inclusion relationship
special_equiv_reln(reln): special processing for equivalence relationships
special_idempotent(op): special processing for idempotent functions
special_inher_add(pred): special processing for inherited-additive predicates
special_mon(op): special processing for monotone operator
special_mon2(op): special processing for monotone operator with 2 arguments
special_mondn(op): special processing for monotone decreasing operator
special_part_order(reln): special processing for partial-order relationships
special_self_inverse(op): special processing for self_inverse functions
special_tot_order(reln): special processing for total-order relationships
standardize_bound_vars_adv(formula): standardize the bound variable names in a formula, restarting bound variable names counter
standardize_bound_vars_in(tree,std_bv_names): standardize the bound variable names in a formula
standardize_bound_vars_adv(formula): standardize the bound variable names in a formula, restarting bound variable names counter
standardize_bound_vars_in(tree,std_bv_names): standardize the bound variable names in a formula