Skip to content

Commit

Permalink
fix: dependencies are now generated properly for the walkthrough
Browse files Browse the repository at this point in the history
- the `apply .. to ..` arguments are now added to the damf sequent's dependencies
- the X in `apply X ..` was being repeated in the sequent's dependencies if used many times --> should be included once
  • Loading branch information
innofarah committed May 9, 2024
1 parent ab25f2e commit f931011
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/abella.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,14 +1285,22 @@ and process_proof1 proc =
let damf_mark h =
match h with
| Remove (name, _) | Keep (name, _) ->
if not @@ Prover.is_hyp name then Damf.mark_lemma name
if not @@ Prover.is_hyp name then
let ex n = n = name in
if not (List.exists ex !Damf.used_lemmas) then
Damf.mark_lemma name
in
let rec damf_mark_list list =
match list with
| [] -> ()
| x :: xs -> damf_mark x ; damf_mark_list xs
in
let perform () =
begin match input with
| Induction(args, hn) -> Prover.induction ?name:hn args
| CoInduction hn -> Prover.coinduction ?name:hn ()
| Apply(depth, h, args, ws, hn ) -> begin
damf_mark h ;
damf_mark h ; damf_mark_list args ;
Prover.apply ?depth ?name:hn h args ws ~term_witness
end
| Backchain(depth, h, ws) -> begin
Expand Down

0 comments on commit f931011

Please sign in to comment.