Git Product home page Git Product logo

Comments (19)

yutakang avatar yutakang commented on May 26, 2024

We can inspect the proof scripts suggested by Sledgehammer to identify useful conjectures.

from psl.

yutakang avatar yutakang commented on May 26, 2024

I have to work on not only the production of conjectures in work_on_ornode in Proof_By_Abduction.ML but also add_or2and_edge in Seed_Of_And_Node.ML.

One critical question is what conjectures we should store in the and-node? All-conjectures? Conjectures whose names appear in the SH output?

We should opt for a solution that is consistent with other cases.

from psl.

yutakang avatar yutakang commented on May 26, 2024

In the current implementation, we
-1. add and-nodes in https://github.com/data61/PSL/blob/9084e8e5dd270c0d1e3fbdc46823e534c4bbb006/Abduction/Proof_By_Abduction.ML#LL43C37-L43C50

  • 2a. add child-ornodes in
    val graph_w_ornodes(*expensive*) = fold (add_child_ornodes_for_this_andnode pst) new_andnds_keys graph_w_andnodes : abduction_graph;
  • 2b This function also adds edges from the and-node to its child-or-nodes.
    val graph_w_edges = add_edges_from_andnodes_to_ornodes [and_key] graph_w_ornodes: abduction_graph;
  • 3a. add or-to-and edges in
    val graph_w_ornodes_n_or2add_edges = fold (SOAN.add_or2and_edge or_key) seeds_of_newly_added_andnodes graph_w_ornodes: abduction_graph;

    |> PGraph.new_node (or2and_edge_key, or2and_edge_val)
  • 3b. This function also connects the parental or-node to the labelled edge.
    |> Update_Abduction_Graph.add_edge_acyclic_if_possible or_key or2and_edge_key
  • 3c. This function also connects the labelled edge to the and-node.
    |> Update_Abduction_Graph.add_edge_acyclic_if_possible or_key or2and_edge_key
  • 3d. cut edges to and-nodes inside add_or2and_edge in Seed_Of_And_Node.ML
    val result = cut_edge_to_andnode_if_no_parental_ornode_can_be_proved_assmng_subgoals andnode_key or2and_edge_key graph_w_or2and_edge_connected;

Should we also cut edges to the or-nodes that represent conjectures that are not used in SH's output?

from psl.

yutakang avatar yutakang commented on May 26, 2024

In the current implementation, we -1. add and-nodes in https://github.com/data61/PSL/blob/9084e8e5dd270c0d1e3fbdc46823e534c4bbb006/Abduction/Proof_By_Abduction.ML#LL43C37-L43C50

  • 2a. add child-ornodes in

    val graph_w_ornodes(*expensive*) = fold (add_child_ornodes_for_this_andnode pst) new_andnds_keys graph_w_andnodes : abduction_graph;

  • 2b This function also adds edges from the and-node to its child-or-nodes.

    val graph_w_edges = add_edges_from_andnodes_to_ornodes [and_key] graph_w_ornodes: abduction_graph;

  • 3a. add or-to-and edges in

    val graph_w_ornodes_n_or2add_edges = fold (SOAN.add_or2and_edge or_key) seeds_of_newly_added_andnodes graph_w_ornodes: abduction_graph;

    |> PGraph.new_node (or2and_edge_key, or2and_edge_val)

  • 3b. This function also connects the parental or-node to the labelled edge.

    |> Update_Abduction_Graph.add_edge_acyclic_if_possible or_key or2and_edge_key

  • 3c. This function also connects the labelled edge to the and-node.

    |> Update_Abduction_Graph.add_edge_acyclic_if_possible or_key or2and_edge_key

  • 3d. cut edges to and-nodes inside add_or2and_edge in Seed_Of_And_Node.ML

    val result = cut_edge_to_andnode_if_no_parental_ornode_can_be_proved_assmng_subgoals andnode_key or2and_edge_key graph_w_or2and_edge_connected;

Should we also cut edges to the or-nodes that represent conjectures that are not used in SH's output?

We simplified this in 962cca6.

from psl.

yutakang avatar yutakang commented on May 26, 2024

Problem: we have two problems at once:

  • Results of tactic applications (implicit conjecturing) tend to contain multiple sub-goals in one and-node, where all sub-goals have to satisfy heuristics.
  • Results of explicit conjecturing tend to consist of one conjecture each, but often we need multiple conjectures to solve the current sub-goal. So, we need to make sets of explicit conjectures, some of which may have already been proved or refuted.

from psl.

yutakang avatar yutakang commented on May 26, 2024

The bad thing about the current implementation is that filtering of conjectures is happening in two different locations:

from psl.

yutakang avatar yutakang commented on May 26, 2024

Are SeLFiE-based filters useful only for explicit conjectures?

Maybe. -> counter example:

https://github.com/data61/PSL/blob/e7b482050f742bcc81d70a5068741e3527794ca0/Abduction/Seed_Of_Or2And_Edge.ML#LL120C16-L120C16

Anyways, the application of filtering should happen at the same place where implicit conjecturing also takes place for clarity.

from psl.

yutakang avatar yutakang commented on May 26, 2024

But the return type of apply_PSL_to_get_seeds_of_or2and_edges has to be seeds_of_or2and_edge because we need the resulting proof states after applying tactics.

This means that we have to apply filtering either

  • to conjectures of type term within apply_PSL_to_get_seeds_of_or2and_edges or
  • to terms inside seeds_of_or2and_edge after calling apply_PSL_to_get_seeds_of_or2and_edges.

I guess the latter will make the overall workflow easier to understand.

from psl.

yutakang avatar yutakang commented on May 26, 2024

At the same time, I should probably apply filtering functions to terms while constructing seeds not after constructing seeds because we have different treatments for terms for explicit/implicit conjecturing:

  • for implicit conjecturing by tactic applications, we often have to check if all terms satisfy conditions, while
  • for explicit conjecturing, we have to discard terms that do not satisfy conditions and construct a set of conjectures by collecting terms that passed the conditions.

from psl.

yutakang avatar yutakang commented on May 26, 2024

We need decremental conjecturing only for explicit conjecturing.

The algorithm is something like

fun identify_useful_conjectures (conjectures, accumulator) := {
  assume conjectures;
  try to prove the current goal;
  if proved using used_conjectures
  then 
    conjectures := conjectures - used_conjectures;
    identify_useful_conjectures (conjectures, used_conjectures @ accumulator)
 else
    accumulator
}

identify_useful_conjectures (explicit_conjectures, [ ]);

from psl.

yutakang avatar yutakang commented on May 26, 2024

identify_useful_conjectures is difficult to parallelise for each or-node.

But after the first iteration, we should have many or-nodes to handle (in parallel).

from psl.

yutakang avatar yutakang commented on May 26, 2024

We need decremental conjecturing only for explicit conjecturing.

The algorithm is something like

fun identify_useful_conjectures (conjectures, accumulator) := {
  assume conjectures;
  try to prove the current goal;
  if proved using used_conjectures
  then 
    conjectures := conjectures - used_conjectures;
    identify_useful_conjectures (conjectures, used_conjectures @ accumulator)
 else
    accumulator
}

identify_useful_conjectures (explicit_conjectures, [ ]);

I should not remove all the used conjectures at once like: conjectures := conjectures - used_conjectures;
Instead of that, I should create sets of conjectures, in each of which one used_conjecture is removed from the previous conjectures.

from psl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.