Otter 1

Preview:

DESCRIPTION

OTTER (Organized Techniques for Theorem-proving and Effective Research) is a first-order logic based theorem prover.

Citation preview

OTTER 1

Language classification and OTTER

imperative

declarative

compiler

Interpreter(scripting)

Lamda calculator

Prover

C, C++

JavaAssembler

Python

ruby

perl

Haskell

Ocaml

Prolog

OTTER

Isabelle

Two streams of computing

1970 1980 1990

2000

2010

assembler

C言語(1972-)

Lisp (1958-)

prolog(1972-)

mapReduce

OcamlHaskel

Java(1990-) Ruby / Python

Languages on Turing machine

Turing machine Turing tape Computer

Recursive function

Kleene Loop C

language

lambda calculus Church recursion Haskell

National deduction Gentzen

Mathematical recursion Proof

Mathematical recursion

Based on natural number. We can invoke recursive functions endlessly.

Proof

A chain of clauses logically connected from

Axioms.

I don’t know about flag and loop

Background: Resolution Principle applied

Proof Theory

Hilbert System

Gentzen System

Sequent calculus

Tableau Calculus

Resolution PrincipleApplied to

computation

OTTER’s basic methodology

resolution

modulation

Binary resolutionModus potens, one by one

Hyper resolutionNucleus and satellite, All at one

DemoulationTerm rewriting

ParamodulationEquational reasoning

list(usable). (a=b) | (c=d).end_of_list.list(sos). P(a) | Q(n, f(c,g(d))).end_of_list.

list(usable). -Greek(x) | Person(x). -Person(x) | Mortal(x). end_of_list.list(sos). Greek(sorates). end_of_list.

list(usable). -A(x,y) | A(x, S(y)).end_of_list.list(demodulators). S(S(x)) = x.end_of_list.

|list(usable). -Sibling(x,y) | Brother(x,y) | Sister(x,y).end_of_list.list(sos). Sibling(pat, ray) | Cousin(pat, ray).end_of_list.

Four interactions and OTTER

+

+ +-

-

-

+-

Gravitational interaction(weighting)weight_list(pick_and_purge).weight(P(rew($(0),$(0)),$(1)), 99)

Electromagnetic interaction (resolution)-father(x,y) | -mother(x,z) | grandmother(x,z)

Strong interaction (modulation)(a=b) | (c=d).P(a) | Q(n, f(c,g(d))).

Liar paradox: three cases

P(says(A, L(B)). P(says(B, L(A)).

P(says(A, T(B)). P(says(B, T(A)).

P(says(A, L(B)). P(says(B, T(A)).

satisfiable

satisfiable

unsatisfiable

Main loop of OTTER main.c 59 | while (giv_cl != NULL && status == KEEP_SEARCHING) { 81 | index_lits_clash(giv_cl); 82 | append_cl(Usable, giv_cl); 83 | if (splitting()) 84 | possible_given_split(giv_cl); 85 | infer_and_process(giv_cl);

101 | if (status == KEEP_SEARCHING) { 102 | if (Parms[CHANGE_LIMIT_AFTER].val == Stats[CL_GIVEN]) { 103 | int new_limit; 104 | new_limit = Parms[NEW_MAX_WEIGHT].val; 105 | Parms[MAX_WEIGHT].val = new_limit; 106 | printf("\nreducing weight limit to %d.\n", new_limit); 107 | } 108 | if (splitting()) 109 | possible_split(); /* parent does not return if successful */ 110 | giv_cl = extract_given_clause(); 111 | }

Loop until no clause can be extracted from set of support

Main loop of OTTER

+-

++

++

--

+

+++

-

+ - ++

+

+ -

clash

+-+

clash

+-

pick up pick up

Search stopped because sos empty.

Clash (resolve.c)225 |static void clash(struct clash_nd *c_start,226 | struct context *nuc_subst,227 | struct literal *nuc_lits,228 | struct clause *nuc,229 | struct context *giv_subst,230 | struct literal *giv_lits,231 | struct clause *giv_sat,232 | int (*sat_proc)(struct clause *c),233 | int inf_clock,234 | int nuc_pos,235 | int ur_box)

Main loop of OTTER clause.c 3384 |struct clause *extract_given_clause(void) 3385 |{ 3386 | struct clause *giv_cl; 3387 | 3388 | CLOCK_START(PICK_GIVEN_TIME); 3389 | giv_cl = find_given_clause(); 3390 | if (giv_cl) { 3391 | rem_from_list(giv_cl); 3392 | } 3393 | CLOCK_STOP(PICK_GIVEN_TIME); 3394 | return(giv_cl); 3395 |} /* extract_given_clause */

3334 |struct clause *find_given_clause(void) 3335 |{ 3336 | struct clause *giv_cl; 3343 | if (Flags[SOS_QUEUE].val) 3344 | giv_cl = find_first_cl(Sos); 3345 | 3346 | else if (Flags[SOS_STACK].val) 3347 | giv_cl = find_last_cl(Sos); 3348 | 3368 | else 3369 | giv_cl = find_lightest_cl(Sos); 3370 | }

There are three kinds of searching state space

1) Stack 2) Queue

3) weghting

If there is no clause found inset of support,

reasoning process is terminated.

Hyper resolution

+-++

++-

-+-

++

++

--

+

-1 |set(hyper_res).2 |assign(stats_level,1).3 |4 |list(usable).5 | -Sibling(x,y) | Brother(x,y) | Sister(x,y).6 |end_of_list.7 |8 |list(sos).9 | Sibling(pat, ray) | Cousin(pat, ray).10 |end_of_list.

paramodulation

1 |set(para_into).

4 |assign(stats_level,1).

5 |

6 |list(usable).

7 | a1 = b1.

8 | a2 = b2.

9 |end_of_list.

10 |

11 |list(sos).

12 | P(a1,a2).

13 |end_of_list.

Clauses are generated according to line 7 and 8.

Paramodulation 1

1 |set(para_into).2 |assign(max_given,3).3 |assign(stats_level,1).4 |5 |list(usable).6 | (a=b) | (c=d).7 |end_of_list.8 |9 |list(sos).10 | P(a) | Q(n, f(c,g(d))).11 |end_of_list.

Paramodulation 2

1 |set(para_into).2 |assign(stats_level,1).3 |4 |list(usable).5 | father(ken)=jim.6 | mother(jim)=fay.7 |end_of_list.8 |9 |list(sos).10 | Grandmother(mother(father(x)),x).11 |end_of_list.

Recommended