Need for Data . . . Program Synthesis Wave Algorithm for . . . Boolean Logic . . . From Program Synthesis to Optimal Program . . . Optimal Program Synthesis Logical Interpretation . . . A Seemingly Natural . . . Counter-Example to . . . Joaquin Reyna Solution to the . . . Department of Computer Science Home Page University of Texas at El Paso Title Page 500 W. University El Paso, TX 79968, USA ◭◭ ◮◮ magitek7@gmail.com ◭ ◮ Page 1 of 24 Go Back Full Screen Close Quit
Need for Data . . . Program Synthesis 1. Need for Data Processing: A Brief Reminder Wave Algorithm for . . . • One of the main objectives of science is to describe the Boolean Logic . . . world. Optimal Program . . . Logical Interpretation . . . • This means that we know the values of different phys- A Seemingly Natural . . . ical quantities. Counter-Example to . . . • There are many physical characteristics which are dif- Solution to the . . . ficult to measure directly. Home Page • E.g.: distance to a star, amount of oil in a well. Title Page • We can measure them indirectly : ◭◭ ◮◮ – we measure the values of related easier-to-measure ◭ ◮ characteristics x 1 , . . . , x n , Page 2 of 24 – find (and list) all possible relations between these Go Back characteristics x i and the desired quantity y ; – based on these relations, we design an algorithm Full Screen that estimates y based the x 1 , . . . , x n : y = f ( x 1 , . . . , x n ) . Close Quit
Need for Data . . . Program Synthesis 2. Other Problems for Which Data Processing Is Wave Algorithm for . . . Needed Boolean Logic . . . • An important goal of science is to predict the future Optimal Program . . . values y based on the current values x 1 , . . . , x n . Logical Interpretation . . . A Seemingly Natural . . . • In many cases, we only know some relations between Counter-Example to . . . y , x i , and maybe some auxiliary characteristics. Solution to the . . . • Our objective is to design an algorithm that transforms Home Page the value x 1 , . . . , x n into the desired prediction y . Title Page • In engineering, we want to design an object with given ◭◭ ◮◮ characteristics x 1 , . . . , x n . ◭ ◮ • In many cases, we only know the relations between the Page 3 of 24 design parameters y and the values x i . Go Back • We need to design an algorithm producing y based on the x i . Full Screen Close Quit
Need for Data . . . Program Synthesis 3. Program Synthesis Wave Algorithm for . . . • A general problem: Boolean Logic . . . Optimal Program . . . – we know the values of some of the quantities x 1 , . . . , x n , Logical Interpretation . . . and A Seemingly Natural . . . – we know the relations between these quantities, the Counter-Example to . . . desired quantity y , and some other quantities. Solution to the . . . • Our objective is to use the known values and the known Home Page relations to find the values of the desired quantities. Title Page • Traditionally, practitioners use their own creativity to ◭◭ ◮◮ come up with an algorithm. ◭ ◮ • It turns out that we can have a system that automati- Page 4 of 24 cally synthesizes the desired program . Go Back Full Screen Close Quit
Need for Data . . . Program Synthesis 4. Toy Example Wave Algorithm for . . . • A triangle is described by its angles A, B, C and side Boolean Logic . . . lengths a, b, c . Optimal Program . . . Logical Interpretation . . . • We know the following relations between them: A Seemingly Natural . . . • A + B + C = π (the sum of the angles is 180 ◦ , or π Counter-Example to . . . radians), Solution to the . . . • a 2 + b 2 − 2 · a · b · cos( C ) = c 2 and similar expressions Home Page for a and b (cosine theorem), and Title Page a b c • sin( A ) = sin( B ) = sin( C ) (sine theorem). ◭◭ ◮◮ ◭ ◮ • Typical questions: Page 5 of 24 – If we know a, b and c , can we determine A ? and if yes, how? Go Back – If we know a, b and A , how to compute B ? Full Screen and if yes, how? Close Quit
Need for Data . . . Program Synthesis 5. Preparing for the Program Synthesis: Idea Wave Algorithm for . . . • First, we analyze which quantities are directly com- Boolean Logic . . . putable from which. Optimal Program . . . Logical Interpretation . . . • Suppose that we have a relation F ( x, y, z ) = 0. A Seemingly Natural . . . • If we know all of these values but one, then we have an Counter-Example to . . . equation with one unknown. Solution to the . . . • So, if we already know x and y , then we are able to Home Page compute z . Title Page • We will describe this implication as x, y → z . ◭◭ ◮◮ • Similarly, if we know x and z , then we can compute y , ◭ ◮ and from y and z we can compute x . Page 6 of 24 • So each equation leads to as many computability rela- Go Back tions as there are quantities in it. Full Screen • In our case we get three computability relations: Close x, y → z ; x, z → y ; y, z → x. Quit
Need for Data . . . Program Synthesis 6. Example Wave Algorithm for . . . In the triangle case, the relations turn into the following Boolean Logic . . . formulas: Optimal Program . . . Logical Interpretation . . . • A, B → C ; B, C → A ; A, C → B ; A Seemingly Natural . . . (these three come from the equation A + B + C = π ) Counter-Example to . . . • A, a, b → B ; A, a, B → b ; . . . Solution to the . . . (from sine theorem), and Home Page • a, b, C → c ; a, b, c → C ; a, c, C → b ; b, c, C → a ; . . . Title Page (from cosine theorem). ◭◭ ◮◮ ◭ ◮ Page 7 of 24 Go Back Full Screen Close Quit
Need for Data . . . Program Synthesis 7. Wave Algorithm for Program Synthesis Wave Algorithm for . . . • Algorithm: we first mark the variables that we know. Boolean Logic . . . Optimal Program . . . • Then, repeatedly: Logical Interpretation . . . – we find the rules for which all conditions are marked A Seemingly Natural . . . and the conclusion is not, Counter-Example to . . . – and mark the conclusion. Solution to the . . . Home Page • We stop when no new marks are assigned. Title Page • If the desired quantity y is not marked, then we cannot ◭◭ ◮◮ compute this quantity. ◭ ◮ • If y is marked, we can combine the corresponding al- gorithms into a program for computing y based on x i . Page 8 of 24 Go Back Full Screen Close Quit
Need for Data . . . Program Synthesis 8. Triangle Example Wave Algorithm for . . . • Suppose that we know A , B , we want to find C , a . Boolean Logic . . . Optimal Program . . . • Then, we first mark A and B . Logical Interpretation . . . • There is only one rule whose conditions are marked: A Seemingly Natural . . . the rule A, B → C . So, we mark C . Counter-Example to . . . • On the second iteration, we find three rules whose con- Solution to the . . . ditions are marked: Home Page A, B → C ; B, C → A ; A, C → B. Title Page ◭◭ ◮◮ • Their conclusions are already marked; so we stop. ◭ ◮ • C is marked, so we can compute C . Page 9 of 24 • C was obtained from a rule A, B → C that stems from A + B + C = π . Go Back • So, we find C from the equation A + B + C = π Full Screen • As for a , it is not marked, and so, cannot be computed. Close Quit
Need for Data . . . Program Synthesis 9. Boolean Logic Interpretation Wave Algorithm for . . . • We can define a boolean variable X meaning Boolean Logic . . . Optimal Program . . . “we can compute the quantity x ”. Logical Interpretation . . . • Each rule x, y → z turns into a formula X & Y → Z . A Seemingly Natural . . . Counter-Example to . . . • Original problem: can y be computed? Solution to the . . . • In logical terms: is Y deducible from the rules-related Home Page formulas? Title Page • Triangle example: ◭◭ ◮◮ – we have a knowledge base A & B → C ; B & C → A ; ◭ ◮ . . . ; A ; B , and Page 10 of 24 – we want to know whether C and a follow from these formulas. Go Back Full Screen • Application: automatic program synthesis in space mis- sions, e.g., in the NASA Cassini mission to Saturn. Close Quit
Need for Data . . . Program Synthesis 10. Limitations of the Boolean Logic Approach Wave Algorithm for . . . • Situation: we know two relations between the unknowns Boolean Logic . . . y 1 and y 2 : Optimal Program . . . Logical Interpretation . . . y 1 + y 2 − 1 = 0 and y 1 − y 2 − 2 = 0 . A Seemingly Natural . . . • From this system of 2 linear equations with 2 unknowns, Counter-Example to . . . we can determine both y 1 and y 2 . Solution to the . . . Home Page • However, the Boolean-logic approach does not work: Title Page – rules lead to formulas Y 1 → Y 2 and Y 2 → Y 1 ; ◭◭ ◮◮ – from these formulas, we cannot conclude Y 1 . ◭ ◮ • Therefore, we cannot conclude that y i are computable. Page 11 of 24 • It was shown that such examples can be handled Go Back – if we replace the original Boolean logic Full Screen – with a more complex fuzzy-type logic. Close Quit
Recommend
More recommend