Commit e670308
authored
Fix corpus false positives in deck diagnostics (#53)
* Fix TITLE free-text body being parsed as a keyword
The line following TITLE is free-form text, but the diagnostics engine
scanned it as a keyword. When that text happened to be an upper-case
token matching a real keyword name (CO2STORE, H2STORE) or an arbitrary
label (ACTIONX_GCONPROD, PYACTION_GCONPROD_INSERT_KW), it was wrongly
flagged as an indented or unrecognised keyword.
Consume the single free-form text line after any raw-text keyword
(TITLE) verbatim, before section/terminator/keyword analysis.
* Infer one record for fixed keywords lacking a resolved count
opm-common classifies some keywords as 'fixed' without a concrete
record count (EOS derives its count from another keyword). The engine
read that as 'expects zero records', so the value record on the next
line (EOS / PR) was mistaken for a new keyword and PR was flagged as
unrecognised.
When a fixed keyword has no records_meta/size_count but does declare a
per-record column count, assume it expects at least one record.
* Don't require a terminator on bare SUMMARY array vectors
Probe-expanded SUMMARY vectors (WSIR, WSPR, WMCTL, and the C/W
component-rate vectors) are classified 'array' but, unlike the
manual-derived mnemonics, lack the optional_body flag. Written bare and
stacked under a single shared '/', they were wrongly flagged as missing
their own terminating '/'.
Treat any array-kind keyword whose sections include SUMMARY as
optional-body when it consumed no records, keying off the SUMMARY
section so real cell arrays (PRESSURE, PORO) still require their '/'.
* Understand RPT* report keywords' free-form mnemonic bodies
RPTRST/RPTSCHED/RPTSOL/… take a list of output mnemonics terminated by
'/'. Many mnemonics are spelled like real keywords in column 1
(PRESSURE, SGAS, SOIL, XMF, YMF, ZMF), so the scanner closed the report
block early and flagged each as a wrong-section / unterminated keyword.
While a report keyword's block is open, treat every column-1 token as
body content; a section header still ends the block. RPTSCHED is dropped
from the default exclusion list since the body is now parsed correctly
without suppressing checks on the keyword itself.
* Add curated supplement for OPM keywords missing from the index
Some keywords OPM Flow accepts are in neither the reference manual nor
opm-common, so they never reach the generated keyword index and were
flagged as unrecognised on the known-good corpus — and where a missing
keyword swallowed its own records, the well names under it cascaded into
further false positives.
Add a small hand-maintained supplement (CO2STORE/H2STORE/thermal/
compositional keywords FGDN, FCGMM/I, FCWM, WCMPR/IR, WELLSHUT, STORE,
AIM, CVTYPE, AMF, PREFT, ZCRITVIS, SPECHA-H) merged into the index by
both the extension and the corpus harness. WELLSHUT is list-shaped so it
absorbs its well-name records; the SUMMARY vectors carry section/shape;
the rest are recognised-only.
* Normalise shapeless SUMMARY vectors and stop them swallowing mnemonics
opm-common's probe expansion (and the L-modifier variants CGMIRL,
CGMPRL, …) emit recognised SUMMARY entries with no record shape, so
their optional '/'-terminated name list (CGMIRL / INJ1 / /) was parsed
with the well name mistaken for a new keyword. Normalise every
SUMMARY-section vector that lacks a size_kind to the 'array' shape (the
bare case is already exempt from the terminator check).
Guard the array name-list absorption so a column-1 token that is itself
a recognised SUMMARY vector by shape (UDQ name, region-set, L-modifier,
deck_name_regex family) starts its own vector rather than being swallowed
— otherwise a bare enable-keyword (PERFORMA) absorbs the UDQ mnemonics
that follow it and is then flagged for a missing terminator. Both loaders
now share prepareKeywordIndex (supplement + normalisation).1 parent 574280c commit e670308
7 files changed
Lines changed: 514 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
71 | 114 | | |
72 | 115 | | |
73 | 116 | | |
| |||
692 | 735 | | |
693 | 736 | | |
694 | 737 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
699 | 742 | | |
700 | 743 | | |
701 | 744 | | |
| |||
915 | 958 | | |
916 | 959 | | |
917 | 960 | | |
918 | | - | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
919 | 967 | | |
920 | | - | |
| 968 | + | |
921 | 969 | | |
922 | 970 | | |
923 | | - | |
| 971 | + | |
924 | 972 | | |
925 | | - | |
| 973 | + | |
926 | 974 | | |
927 | 975 | | |
928 | | - | |
| 976 | + | |
929 | 977 | | |
930 | | - | |
| 978 | + | |
931 | 979 | | |
932 | 980 | | |
933 | 981 | | |
| |||
1905 | 1953 | | |
1906 | 1954 | | |
1907 | 1955 | | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
0 commit comments