nx_ipdock_lib.nx source
↩ module page · 120 lines · 5654 B
1// nx_ipdock_lib.nx -- IP DOCKETING: patent and trademark deadlines, and which of them are survivable.
2// The category malpractice insurers price highest. Most litigation deadlines can be extended, refiled or
3// forgiven. IP deadlines mostly cannot: miss the Paris Convention priority year and the priority claim is
4// gone permanently, worldwide, with no petition available. So the load-bearing distinction here is not
5// "late or not" but u2605WHICH DEADLINES HAVE A GRACE PERIOD AND WHICH ARE IRRECOVERABLE.
6//
7// Paris Convention (Art 4): 12 months from the priority date to file abroad. IRRECOVERABLE.
8// PCT national phase: 30 months from priority. Late entry is possible in some offices but never assumed
9// here -- treated as irrecoverable so the docket never quietly relies on a discretionary remedy.
10// US patent maintenance fees: due at 3.5 / 7.5 / 11.5 years from grant, each with a SIX-MONTH GRACE
11// window at a surcharge. Late-but-within-grace is PAYABLE, not lost -- calling it lost abandons a
12// live patent, which is the mirror-image error and just as expensive.
13// US trademark s8 declaration: between years 5 and 6 from registration, six-month grace.
14// US trademark s9 renewal: between years 9 and 10, six-month grace.
15//
16// u2605FAIL-CLOSED ON DATES: an unknown priority, grant or registration date yields IPD_UNKNOWN -- never a
17// computed deadline. A fabricated IP deadline is worse than none, because it will be trusted.
18//
19// All periods are DATA (rule 11) as named constants in days, not literals buried in branches.
20// STRUCTURE: pure decision core, zero I/O. license_tier: ORIGINAL LIB.
21
22import "nx_matter_lib.nx"
23
24const IPD_UNSET: i64 = 0 - 2000000002
25const IPD_UNKNOWN: i64 = 0 - 1
26
27const IPD_OPEN: i64 = 0
28const IPD_GRACE: i64 = 1
29const IPD_LOST: i64 = 2
30
31const IPD_PARIS_DAYS: i64 = 365
32const IPD_PCT_DAYS: i64 = 913
33const IPD_MAINT1_DAYS: i64 = 1278
34const IPD_MAINT2_DAYS: i64 = 2739
35const IPD_MAINT3_DAYS: i64 = 4200
36const IPD_GRACE_DAYS: i64 = 182
37const IPD_TM_S8_OPEN_DAYS: i64 = 1826
38const IPD_TM_S8_DUE_DAYS: i64 = 2191
39const IPD_TM_S9_OPEN_DAYS: i64 = 3287
40const IPD_TM_S9_DUE_DAYS: i64 = 3652
41
42// a deadline computed from an anchor; unknown anchor -> unknown deadline, never day zero
43func ipd_deadline_pure(anchor: i64, period_days: i64) -> i64 {
44 if anchor == IPD_UNSET { return IPD_UNKNOWN }
45 if period_days < 0 { return IPD_UNKNOWN }
46 return anchor + period_days
47}
48
49func ipd_paris_pure(priority: i64) -> i64 { return ipd_deadline_pure(priority, IPD_PARIS_DAYS) }
50func ipd_pct_pure(priority: i64) -> i64 { return ipd_deadline_pure(priority, IPD_PCT_DAYS) }
51
52// u2605IRRECOVERABLE deadlines have NO grace: open until the day itself, then LOST forever.
53func ipd_status_hard_pure(deadline: i64, asof: i64) -> i64 {
54 if deadline == IPD_UNKNOWN { return IPD_UNKNOWN }
55 if asof == IPD_UNSET { return IPD_UNKNOWN }
56 if asof <= deadline { return IPD_OPEN }
57 return IPD_LOST
58}
59
60// u2605GRACE-BEARING deadlines (maintenance fees, s8, s9): late-but-within-grace is still PAYABLE.
61func ipd_status_grace_pure(deadline: i64, asof: i64, grace_days: i64) -> i64 {
62 if deadline == IPD_UNKNOWN { return IPD_UNKNOWN }
63 if asof == IPD_UNSET { return IPD_UNKNOWN }
64 if grace_days < 0 { return IPD_UNKNOWN }
65 if asof <= deadline { return IPD_OPEN }
66 if asof <= (deadline + grace_days) { return IPD_GRACE }
67 return IPD_LOST
68}
69
70// 1 only when a surcharge is owed -- i.e. inside the grace window, not merely late.
71func ipd_surcharge_due_pure(status: i64) -> i64 {
72 if status == IPD_GRACE { return 1 }
73 return 0
74}
75
76// u2605THE SURVIVABILITY QUESTION the docket actually exists to answer.
77func ipd_recoverable_pure(status: i64) -> i64 {
78 if status == IPD_OPEN { return 1 }
79 if status == IPD_GRACE { return 1 }
80 return 0
81}
82
83// days remaining to the operative last day (including grace where one exists)
84func ipd_days_remaining_pure(deadline: i64, asof: i64, grace_days: i64) -> i64 {
85 if deadline == IPD_UNKNOWN { return IPD_UNSET }
86 if asof == IPD_UNSET { return IPD_UNSET }
87 var last: i64 = deadline
88 if grace_days > 0 { last = deadline + grace_days }
89 return last - asof
90}
91
92// trademark windows OPEN then become DUE; filing before the window opens is premature and is refused.
93func ipd_window_status_pure(open_day: i64, due_day: i64, asof: i64, grace_days: i64) -> i64 {
94 if open_day == IPD_UNKNOWN { return IPD_UNKNOWN }
95 if due_day == IPD_UNKNOWN { return IPD_UNKNOWN }
96 if asof == IPD_UNSET { return IPD_UNKNOWN }
97 if asof < open_day { return IPD_UNKNOWN }
98 return ipd_status_grace_pure(due_day, asof, grace_days)
99}
100
101// 1 only if a trademark filing made on this day would be accepted (window open, not past grace)
102func ipd_tm_filable_pure(open_day: i64, due_day: i64, asof: i64, grace_days: i64) -> i64 {
103 if asof == IPD_UNSET { return 0 }
104 if open_day == IPD_UNKNOWN { return 0 }
105 if asof < open_day { return 0 }
106 return ipd_recoverable_pure(ipd_status_grace_pure(due_day, asof, grace_days))
107}
108
109// portfolio: anything LOST or UNKNOWN is exposure. UNKNOWN counts, because an undated IP asset is one
110// nobody is docketing at all.
111func ipd_exposure_pure(lost: i64, unknown: i64) -> i64 { return lost + unknown }
112
113func ipd_status_label(s: i64, out: *u8) -> i64 {
114 if s == IPD_OPEN { mt_catcopy(out, 0, "OPEN" as *u8); out[4] = 0 as u8; return 4 }
115 if s == IPD_GRACE { mt_catcopy(out, 0, "GRACE-SURCHARGE" as *u8); out[15] = 0 as u8; return 15 }
116 if s == IPD_LOST { mt_catcopy(out, 0, "LOST" as *u8); out[4] = 0 as u8; return 4 }
117 mt_catcopy(out, 0, "UNKNOWN" as *u8)
118 out[7] = 0 as u8
119 return 7
120}