From deb657ae0bc7163a0108e9e63d10921416063294 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Fri, 8 Mar 2013 18:45:21 +0100 Subject: [PATCH] Actually fix the problems with negation. --- src/auto/ata.ml | 10 +++++----- src/auto/eval.ml | 8 ++++---- tests/docs/tiny.xml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/auto/ata.ml b/src/auto/ata.ml index 275d657..13c4854 100644 --- a/src/auto/ata.ml +++ b/src/auto/ata.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) INCLUDE "utils.ml" @@ -272,10 +272,10 @@ let normalize_negations auto = (* create a new state and add it to the todo queue *) let nq = State.make () in auto.states <- StateSet.add nq auto.states; -(* if not (StateSet.mem q auto.bottom_states) then + if not (StateSet.mem q auto.bottom_states) then auto.bottom_states <- StateSet.add nq auto.bottom_states; if not (StateSet.mem q auto.top_states) then - auto.top_states <- StateSet.add nq auto.top_states; *) + auto.top_states <- StateSet.add nq auto.top_states; Hashtbl.add memo_state (q, false) nq; Queue.add (q, false) todo; nq in @@ -296,10 +296,10 @@ let normalize_negations auto = let nq = if b then q else let nq = State.make () in auto.states <- StateSet.add nq auto.states; -(* if not (StateSet.mem q auto.bottom_states) then + if not (StateSet.mem q auto.bottom_states) then auto.bottom_states <- StateSet.add nq auto.bottom_states; if not (StateSet.mem q auto.top_states) then - auto.top_states <- StateSet.add nq auto.top_states; *) + auto.top_states <- StateSet.add nq auto.top_states; nq in Hashtbl.add memo_state key nq; nq diff --git a/src/auto/eval.ml b/src/auto/eval.ml index f3b81cb..80df253 100644 --- a/src/auto/eval.ml +++ b/src/auto/eval.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) INCLUDE "utils.ml" @@ -50,9 +50,9 @@ module Make (T : Tree.Sig.S) = struct let states0 = get cache tree node in let tag = T.tag tree node in let trans0 = Ata.get_trans auto auto.Ata.states tag in - let parent_states = (*if parent == T.nil then auto.Ata.top_states else*) get cache tree parent in - let fc_states = (*if fc == T.nil then auto.Ata.bottom_states else*) get cache tree fc in - let ns_states = (*if ns == T.nil then auto.Ata.bottom_states else*) get cache tree ns in + let parent_states = if parent == T.nil then auto.Ata.top_states else get cache tree parent in + let fc_states = if fc == T.nil then auto.Ata.bottom_states else get cache tree fc in + let ns_states = if ns == T.nil then auto.Ata.bottom_states else get cache tree ns in let is_root = parent == T.nil in let ctx0 = if is_left then diff --git a/tests/docs/tiny.xml b/tests/docs/tiny.xml index 3d99bb9..647d3fc 100644 --- a/tests/docs/tiny.xml +++ b/tests/docs/tiny.xml @@ -3,7 +3,7 @@ - + -- 2.17.1