lawspec 0.31.0 → 0.31.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/CHANGELOG.md +116 -1
  2. package/README.md +86 -4
  3. package/api.mjs +14 -9
  4. package/authoring.mjs +899 -0
  5. package/beam-coverage.mjs +190 -65
  6. package/beam-doctor.mjs +343 -124
  7. package/bin/lawspec.mjs +1955 -657
  8. package/build.json +135 -129
  9. package/component-packages.mjs +662 -176
  10. package/component.d.ts +82 -20
  11. package/component.mjs +317 -94
  12. package/core.wasm +2 -2
  13. package/core_jsffi.js +5 -5
  14. package/doctor.mjs +558 -299
  15. package/examples-command.mjs +44 -23
  16. package/failure-database.mjs +60 -17
  17. package/files.mjs +122 -62
  18. package/index.d.ts +585 -312
  19. package/input-files.mjs +90 -25
  20. package/launcher.mjs +72 -31
  21. package/learn/adapters.mjs +226 -0
  22. package/learn/app.mjs +1279 -0
  23. package/learn/assert.mjs +33 -0
  24. package/learn/assets.mjs +15 -0
  25. package/learn/browser-runtime.mjs +58 -0
  26. package/learn/bundle.mjs +118 -0
  27. package/learn/compile-worker.mjs +106 -0
  28. package/learn/compiler.mjs +230 -0
  29. package/learn/coverage.json +8259 -0
  30. package/learn/curriculum.json +2955 -0
  31. package/learn/fantomas-worker.mjs +25 -0
  32. package/learn/format-worker.mjs +148 -0
  33. package/learn/fsharp.mjs +83 -0
  34. package/learn/harness-host.mjs +22 -0
  35. package/learn/index.html +326 -0
  36. package/learn/lawspec-core.mjs +223 -0
  37. package/learn/lawspec-language.mjs +69 -0
  38. package/learn/node-test.mjs +11 -0
  39. package/learn/presentation.mjs +73 -0
  40. package/learn/runner.mjs +72 -0
  41. package/learn/sandbox-frame.html +34 -0
  42. package/learn/sandbox.mjs +91 -0
  43. package/learn/store.mjs +141 -0
  44. package/learn/story.mjs +42 -0
  45. package/learn/style-options.json +16 -0
  46. package/learn/style.css +1023 -0
  47. package/learn/theme.js +77 -0
  48. package/learn/typescript.mjs +53 -0
  49. package/learn/vendor/@fontsource-atkinson-hyperlegible-LICENSE.txt +93 -0
  50. package/learn/vendor/@fontsource-atkinson-hyperlegible-mono-LICENSE.txt +93 -0
  51. package/learn/vendor/@fontsource-overpass-LICENSE.txt +93 -0
  52. package/learn/vendor/assemblies.json +1 -0
  53. package/learn/vendor/editor-worker.js +30 -0
  54. package/learn/vendor/editor.css +1 -0
  55. package/learn/vendor/editor.mjs +931 -0
  56. package/learn/vendor/esbuild-wasm-LICENSE.txt +21 -0
  57. package/learn/vendor/esbuild.mjs +2683 -0
  58. package/learn/vendor/esbuild.wasm +0 -0
  59. package/learn/vendor/fable-library/Array.js +1347 -0
  60. package/learn/vendor/fable-library/Async.js +134 -0
  61. package/learn/vendor/fable-library/AsyncBuilder.js +183 -0
  62. package/learn/vendor/fable-library/BigInt.js +306 -0
  63. package/learn/vendor/fable-library/BitConverter.js +138 -0
  64. package/learn/vendor/fable-library/Boolean.js +22 -0
  65. package/learn/vendor/fable-library/CHANGELOG.md +242 -0
  66. package/learn/vendor/fable-library/Char.js +202 -0
  67. package/learn/vendor/fable-library/Choice.js +184 -0
  68. package/learn/vendor/fable-library/CollectionUtil.js +182 -0
  69. package/learn/vendor/fable-library/ConditionalWeakTable.js +21 -0
  70. package/learn/vendor/fable-library/Date.js +841 -0
  71. package/learn/vendor/fable-library/DateOffset.js +261 -0
  72. package/learn/vendor/fable-library/DateOnly.js +124 -0
  73. package/learn/vendor/fable-library/Decimal.js +238 -0
  74. package/learn/vendor/fable-library/Double.js +47 -0
  75. package/learn/vendor/fable-library/Encoding.js +185 -0
  76. package/learn/vendor/fable-library/Event.js +93 -0
  77. package/learn/vendor/fable-library/FSharp.Collections.js +45 -0
  78. package/learn/vendor/fable-library/FSharp.Core.CompilerServices.js +27 -0
  79. package/learn/vendor/fable-library/FSharp.Core.js +156 -0
  80. package/learn/vendor/fable-library/Global.js +29 -0
  81. package/learn/vendor/fable-library/Guid.js +161 -0
  82. package/learn/vendor/fable-library/Int32.js +135 -0
  83. package/learn/vendor/fable-library/List.js +1323 -0
  84. package/learn/vendor/fable-library/Long.js +47 -0
  85. package/learn/vendor/fable-library/MailboxProcessor.js +94 -0
  86. package/learn/vendor/fable-library/Map.js +1396 -0
  87. package/learn/vendor/fable-library/MapUtil.js +130 -0
  88. package/learn/vendor/fable-library/MutableMap.js +339 -0
  89. package/learn/vendor/fable-library/MutableSet.js +233 -0
  90. package/learn/vendor/fable-library/Native.js +14 -0
  91. package/learn/vendor/fable-library/Numeric.js +75 -0
  92. package/learn/vendor/fable-library/Observable.js +113 -0
  93. package/learn/vendor/fable-library/Option.js +104 -0
  94. package/learn/vendor/fable-library/README.md +3 -0
  95. package/learn/vendor/fable-library/Random.js +172 -0
  96. package/learn/vendor/fable-library/Range.js +45 -0
  97. package/learn/vendor/fable-library/Reflection.js +479 -0
  98. package/learn/vendor/fable-library/RegExp.js +141 -0
  99. package/learn/vendor/fable-library/Result.js +165 -0
  100. package/learn/vendor/fable-library/Seq.js +1417 -0
  101. package/learn/vendor/fable-library/Seq2.js +111 -0
  102. package/learn/vendor/fable-library/Set.js +1816 -0
  103. package/learn/vendor/fable-library/String.js +674 -0
  104. package/learn/vendor/fable-library/System.Collections.Generic.js +333 -0
  105. package/learn/vendor/fable-library/System.Text.js +200 -0
  106. package/learn/vendor/fable-library/System.js +289 -0
  107. package/learn/vendor/fable-library/TimeOnly.js +122 -0
  108. package/learn/vendor/fable-library/TimeSpan.js +180 -0
  109. package/learn/vendor/fable-library/Timer.js +67 -0
  110. package/learn/vendor/fable-library/Types.js +198 -0
  111. package/learn/vendor/fable-library/Unicode.13.0.0.js +4 -0
  112. package/learn/vendor/fable-library/Uri.js +165 -0
  113. package/learn/vendor/fable-library/Util.js +796 -0
  114. package/learn/vendor/fable-library/big.d.ts +338 -0
  115. package/learn/vendor/fable-library/lib/big.js +825 -0
  116. package/learn/vendor/fable-library/package.json +24 -0
  117. package/learn/vendor/fable-library/quotation.js +618 -0
  118. package/learn/vendor/fable.js +430 -0
  119. package/learn/vendor/fantomas/FSharp.Core.uawo19tl4c.wasm +0 -0
  120. package/learn/vendor/fantomas/Fantomas.Core.stnanlnpyw.wasm +0 -0
  121. package/learn/vendor/fantomas/Fantomas.FCS.lqohfu5o9y.wasm +0 -0
  122. package/learn/vendor/fantomas/LawSpec.Learn.Formatter.poiijdbsl9.wasm +0 -0
  123. package/learn/vendor/fantomas/Microsoft.CSharp.mp8lhr6rez.wasm +0 -0
  124. package/learn/vendor/fantomas/Microsoft.VisualBasic.0e5fchkecn.wasm +0 -0
  125. package/learn/vendor/fantomas/Microsoft.VisualBasic.Core.17wn27qal2.wasm +0 -0
  126. package/learn/vendor/fantomas/Microsoft.Win32.Primitives.9d566sle9e.wasm +0 -0
  127. package/learn/vendor/fantomas/Microsoft.Win32.Registry.52dy96yk8i.wasm +0 -0
  128. package/learn/vendor/fantomas/System.AppContext.jwujeh069z.wasm +0 -0
  129. package/learn/vendor/fantomas/System.Buffers.y0isk1x97h.wasm +0 -0
  130. package/learn/vendor/fantomas/System.Collections.Concurrent.x5koi7bzem.wasm +0 -0
  131. package/learn/vendor/fantomas/System.Collections.Immutable.diwg7advch.wasm +0 -0
  132. package/learn/vendor/fantomas/System.Collections.NonGeneric.4089xs440e.wasm +0 -0
  133. package/learn/vendor/fantomas/System.Collections.Specialized.hj81u7zblb.wasm +0 -0
  134. package/learn/vendor/fantomas/System.Collections.nvrdeoknr1.wasm +0 -0
  135. package/learn/vendor/fantomas/System.ComponentModel.Annotations.yatcnfjeuk.wasm +0 -0
  136. package/learn/vendor/fantomas/System.ComponentModel.DataAnnotations.led9l5awu3.wasm +0 -0
  137. package/learn/vendor/fantomas/System.ComponentModel.EventBasedAsync.hpvp6cf4de.wasm +0 -0
  138. package/learn/vendor/fantomas/System.ComponentModel.Primitives.v7cajwpaqo.wasm +0 -0
  139. package/learn/vendor/fantomas/System.ComponentModel.TypeConverter.xk1hnyt762.wasm +0 -0
  140. package/learn/vendor/fantomas/System.ComponentModel.rrnda1lucx.wasm +0 -0
  141. package/learn/vendor/fantomas/System.Configuration.bn9vghjcq8.wasm +0 -0
  142. package/learn/vendor/fantomas/System.Console.09ajpiafhz.wasm +0 -0
  143. package/learn/vendor/fantomas/System.Core.wc649o5mw9.wasm +0 -0
  144. package/learn/vendor/fantomas/System.Data.Common.s4cowzd9a9.wasm +0 -0
  145. package/learn/vendor/fantomas/System.Data.DataSetExtensions.5fm360ikxl.wasm +0 -0
  146. package/learn/vendor/fantomas/System.Data.fsu4j4t4jw.wasm +0 -0
  147. package/learn/vendor/fantomas/System.Diagnostics.Contracts.p74re5oxzn.wasm +0 -0
  148. package/learn/vendor/fantomas/System.Diagnostics.Debug.622sixg49n.wasm +0 -0
  149. package/learn/vendor/fantomas/System.Diagnostics.DiagnosticSource.2j35bc2g2b.wasm +0 -0
  150. package/learn/vendor/fantomas/System.Diagnostics.FileVersionInfo.7n0wdvltaa.wasm +0 -0
  151. package/learn/vendor/fantomas/System.Diagnostics.Process.8iffh49mew.wasm +0 -0
  152. package/learn/vendor/fantomas/System.Diagnostics.StackTrace.1yz88vico8.wasm +0 -0
  153. package/learn/vendor/fantomas/System.Diagnostics.TextWriterTraceListener.ua8iuh2vhj.wasm +0 -0
  154. package/learn/vendor/fantomas/System.Diagnostics.Tools.roy5445ugj.wasm +0 -0
  155. package/learn/vendor/fantomas/System.Diagnostics.TraceSource.6qx1ldzz7g.wasm +0 -0
  156. package/learn/vendor/fantomas/System.Diagnostics.Tracing.b4799zpaas.wasm +0 -0
  157. package/learn/vendor/fantomas/System.Drawing.8gcjjqj0pu.wasm +0 -0
  158. package/learn/vendor/fantomas/System.Drawing.Primitives.y2uveru2yk.wasm +0 -0
  159. package/learn/vendor/fantomas/System.Dynamic.Runtime.023zrvzh9x.wasm +0 -0
  160. package/learn/vendor/fantomas/System.Formats.Asn1.znpklkbgqv.wasm +0 -0
  161. package/learn/vendor/fantomas/System.Formats.Tar.5yybjepfi2.wasm +0 -0
  162. package/learn/vendor/fantomas/System.Globalization.Calendars.10g6hyjy3k.wasm +0 -0
  163. package/learn/vendor/fantomas/System.Globalization.Extensions.hrinfrismg.wasm +0 -0
  164. package/learn/vendor/fantomas/System.Globalization.uvs4rah8fk.wasm +0 -0
  165. package/learn/vendor/fantomas/System.IO.4j645gw40d.wasm +0 -0
  166. package/learn/vendor/fantomas/System.IO.Compression.2z7vdt6tfb.wasm +0 -0
  167. package/learn/vendor/fantomas/System.IO.Compression.Brotli.fv80xs79j3.wasm +0 -0
  168. package/learn/vendor/fantomas/System.IO.Compression.FileSystem.88jdddz3sw.wasm +0 -0
  169. package/learn/vendor/fantomas/System.IO.Compression.ZipFile.jkn9avr4vo.wasm +0 -0
  170. package/learn/vendor/fantomas/System.IO.FileSystem.AccessControl.yme0uhbu37.wasm +0 -0
  171. package/learn/vendor/fantomas/System.IO.FileSystem.DriveInfo.qas7wf73rs.wasm +0 -0
  172. package/learn/vendor/fantomas/System.IO.FileSystem.Primitives.d1jmhkzu0e.wasm +0 -0
  173. package/learn/vendor/fantomas/System.IO.FileSystem.Watcher.z570derp0d.wasm +0 -0
  174. package/learn/vendor/fantomas/System.IO.FileSystem.o6jtz51fup.wasm +0 -0
  175. package/learn/vendor/fantomas/System.IO.IsolatedStorage.hqyeyb5ipe.wasm +0 -0
  176. package/learn/vendor/fantomas/System.IO.MemoryMappedFiles.zhamjnusxd.wasm +0 -0
  177. package/learn/vendor/fantomas/System.IO.Pipelines.wrmw5vws31.wasm +0 -0
  178. package/learn/vendor/fantomas/System.IO.Pipes.AccessControl.qcancj8gj2.wasm +0 -0
  179. package/learn/vendor/fantomas/System.IO.Pipes.zhcyguvwkr.wasm +0 -0
  180. package/learn/vendor/fantomas/System.IO.UnmanagedMemoryStream.o8cpjnlard.wasm +0 -0
  181. package/learn/vendor/fantomas/System.Linq.AsyncEnumerable.hyc0b7okjw.wasm +0 -0
  182. package/learn/vendor/fantomas/System.Linq.Expressions.ldibvm0efj.wasm +0 -0
  183. package/learn/vendor/fantomas/System.Linq.Parallel.2buevezvch.wasm +0 -0
  184. package/learn/vendor/fantomas/System.Linq.Queryable.cvq43g1awj.wasm +0 -0
  185. package/learn/vendor/fantomas/System.Linq.lz6mvi0hm2.wasm +0 -0
  186. package/learn/vendor/fantomas/System.Memory.3jekerw0ga.wasm +0 -0
  187. package/learn/vendor/fantomas/System.Net.Http.Json.8k237kkwec.wasm +0 -0
  188. package/learn/vendor/fantomas/System.Net.Http.cityx2bvcl.wasm +0 -0
  189. package/learn/vendor/fantomas/System.Net.HttpListener.s1jreclykx.wasm +0 -0
  190. package/learn/vendor/fantomas/System.Net.Mail.cmlj4c0gto.wasm +0 -0
  191. package/learn/vendor/fantomas/System.Net.NameResolution.q3gf18q13l.wasm +0 -0
  192. package/learn/vendor/fantomas/System.Net.NetworkInformation.xaz5tjw7d0.wasm +0 -0
  193. package/learn/vendor/fantomas/System.Net.Ping.a40atim1h0.wasm +0 -0
  194. package/learn/vendor/fantomas/System.Net.Primitives.i88i20r8sr.wasm +0 -0
  195. package/learn/vendor/fantomas/System.Net.Quic.hx06eo5xkj.wasm +0 -0
  196. package/learn/vendor/fantomas/System.Net.Requests.hkjxlfe5f5.wasm +0 -0
  197. package/learn/vendor/fantomas/System.Net.Security.ch34yya69o.wasm +0 -0
  198. package/learn/vendor/fantomas/System.Net.ServerSentEvents.0u7o0jk3p1.wasm +0 -0
  199. package/learn/vendor/fantomas/System.Net.ServicePoint.xbhxnytx4l.wasm +0 -0
  200. package/learn/vendor/fantomas/System.Net.Sockets.hzgzlvkc9l.wasm +0 -0
  201. package/learn/vendor/fantomas/System.Net.WebClient.84i8nwzbgu.wasm +0 -0
  202. package/learn/vendor/fantomas/System.Net.WebHeaderCollection.326nl7s9g3.wasm +0 -0
  203. package/learn/vendor/fantomas/System.Net.WebProxy.oq3mgkkqef.wasm +0 -0
  204. package/learn/vendor/fantomas/System.Net.WebSockets.2cx1v74vg8.wasm +0 -0
  205. package/learn/vendor/fantomas/System.Net.WebSockets.Client.rafzkktw8j.wasm +0 -0
  206. package/learn/vendor/fantomas/System.Net.w1hpj3bo6r.wasm +0 -0
  207. package/learn/vendor/fantomas/System.Numerics.Vectors.oyv7biw9ux.wasm +0 -0
  208. package/learn/vendor/fantomas/System.Numerics.lyu36wqn19.wasm +0 -0
  209. package/learn/vendor/fantomas/System.ObjectModel.kxu80demuu.wasm +0 -0
  210. package/learn/vendor/fantomas/System.Private.CoreLib.1vy46s12u6.wasm +0 -0
  211. package/learn/vendor/fantomas/System.Private.DataContractSerialization.ao8k9iu77a.wasm +0 -0
  212. package/learn/vendor/fantomas/System.Private.Uri.itn0n2zjd0.wasm +0 -0
  213. package/learn/vendor/fantomas/System.Private.Xml.19nzpxrx8w.wasm +0 -0
  214. package/learn/vendor/fantomas/System.Private.Xml.Linq.tw5eq1hjvo.wasm +0 -0
  215. package/learn/vendor/fantomas/System.Reflection.DispatchProxy.7lajnj8s8c.wasm +0 -0
  216. package/learn/vendor/fantomas/System.Reflection.Emit.7liz9zln06.wasm +0 -0
  217. package/learn/vendor/fantomas/System.Reflection.Emit.ILGeneration.1ut3qgacw8.wasm +0 -0
  218. package/learn/vendor/fantomas/System.Reflection.Emit.Lightweight.d0gvllb1jj.wasm +0 -0
  219. package/learn/vendor/fantomas/System.Reflection.Extensions.zr5bhwfczd.wasm +0 -0
  220. package/learn/vendor/fantomas/System.Reflection.Metadata.ff6np6mz2j.wasm +0 -0
  221. package/learn/vendor/fantomas/System.Reflection.Primitives.igpmvwv78c.wasm +0 -0
  222. package/learn/vendor/fantomas/System.Reflection.TypeExtensions.qouojzlnp9.wasm +0 -0
  223. package/learn/vendor/fantomas/System.Reflection.mk3jyxvh13.wasm +0 -0
  224. package/learn/vendor/fantomas/System.Resources.Reader.41ppfyz2vc.wasm +0 -0
  225. package/learn/vendor/fantomas/System.Resources.ResourceManager.sfwvfmw1ea.wasm +0 -0
  226. package/learn/vendor/fantomas/System.Resources.Writer.3uvs9tp38z.wasm +0 -0
  227. package/learn/vendor/fantomas/System.Runtime.CompilerServices.Unsafe.puz1xm53oc.wasm +0 -0
  228. package/learn/vendor/fantomas/System.Runtime.CompilerServices.VisualC.9qdau315py.wasm +0 -0
  229. package/learn/vendor/fantomas/System.Runtime.Extensions.i7gntui96b.wasm +0 -0
  230. package/learn/vendor/fantomas/System.Runtime.Handles.00oxj4o6ov.wasm +0 -0
  231. package/learn/vendor/fantomas/System.Runtime.InteropServices.JavaScript.9kq1vofond.wasm +0 -0
  232. package/learn/vendor/fantomas/System.Runtime.InteropServices.RuntimeInformation.my7qeqbhfh.wasm +0 -0
  233. package/learn/vendor/fantomas/System.Runtime.InteropServices.vqp80tnwc7.wasm +0 -0
  234. package/learn/vendor/fantomas/System.Runtime.Intrinsics.u0samjybfo.wasm +0 -0
  235. package/learn/vendor/fantomas/System.Runtime.Loader.n6zxw1b98a.wasm +0 -0
  236. package/learn/vendor/fantomas/System.Runtime.Numerics.o40sjhz59x.wasm +0 -0
  237. package/learn/vendor/fantomas/System.Runtime.Serialization.Formatters.1esvva4te3.wasm +0 -0
  238. package/learn/vendor/fantomas/System.Runtime.Serialization.Json.4n7u09advh.wasm +0 -0
  239. package/learn/vendor/fantomas/System.Runtime.Serialization.Primitives.xs2bo91wvk.wasm +0 -0
  240. package/learn/vendor/fantomas/System.Runtime.Serialization.Xml.ny21jmziti.wasm +0 -0
  241. package/learn/vendor/fantomas/System.Runtime.Serialization.qcxaur5wqs.wasm +0 -0
  242. package/learn/vendor/fantomas/System.Runtime.odq454d6j9.wasm +0 -0
  243. package/learn/vendor/fantomas/System.Security.AccessControl.8yfnzmqzaq.wasm +0 -0
  244. package/learn/vendor/fantomas/System.Security.Claims.8ogy0860de.wasm +0 -0
  245. package/learn/vendor/fantomas/System.Security.Cryptography.Algorithms.8zijp1svfw.wasm +0 -0
  246. package/learn/vendor/fantomas/System.Security.Cryptography.Cng.yxagtt77no.wasm +0 -0
  247. package/learn/vendor/fantomas/System.Security.Cryptography.Csp.uhfbvvau84.wasm +0 -0
  248. package/learn/vendor/fantomas/System.Security.Cryptography.Encoding.2ywrusvy8q.wasm +0 -0
  249. package/learn/vendor/fantomas/System.Security.Cryptography.OpenSsl.oa268u7i92.wasm +0 -0
  250. package/learn/vendor/fantomas/System.Security.Cryptography.Primitives.5uhvqe8puk.wasm +0 -0
  251. package/learn/vendor/fantomas/System.Security.Cryptography.X509Certificates.6i7pxilopt.wasm +0 -0
  252. package/learn/vendor/fantomas/System.Security.Cryptography.d0quqk1iyr.wasm +0 -0
  253. package/learn/vendor/fantomas/System.Security.Principal.Windows.gpqua4rz29.wasm +0 -0
  254. package/learn/vendor/fantomas/System.Security.Principal.i20kfklf3g.wasm +0 -0
  255. package/learn/vendor/fantomas/System.Security.SecureString.x2y8tzci3c.wasm +0 -0
  256. package/learn/vendor/fantomas/System.Security.e83vvh6sl2.wasm +0 -0
  257. package/learn/vendor/fantomas/System.ServiceModel.Web.poglliv2no.wasm +0 -0
  258. package/learn/vendor/fantomas/System.ServiceProcess.yro5uj2opo.wasm +0 -0
  259. package/learn/vendor/fantomas/System.Text.Encoding.CodePages.2wchx40i7z.wasm +0 -0
  260. package/learn/vendor/fantomas/System.Text.Encoding.Extensions.8utaw61kn5.wasm +0 -0
  261. package/learn/vendor/fantomas/System.Text.Encoding.cxdyfepnpj.wasm +0 -0
  262. package/learn/vendor/fantomas/System.Text.Encodings.Web.37ehbi7cye.wasm +0 -0
  263. package/learn/vendor/fantomas/System.Text.Json.ixiaa8hd3h.wasm +0 -0
  264. package/learn/vendor/fantomas/System.Text.RegularExpressions.2fhfmkk6vf.wasm +0 -0
  265. package/learn/vendor/fantomas/System.Threading.6pry74a050.wasm +0 -0
  266. package/learn/vendor/fantomas/System.Threading.AccessControl.76zfdfy8go.wasm +0 -0
  267. package/learn/vendor/fantomas/System.Threading.Channels.gpxnr01lmp.wasm +0 -0
  268. package/learn/vendor/fantomas/System.Threading.Overlapped.aqpl8tzdyc.wasm +0 -0
  269. package/learn/vendor/fantomas/System.Threading.Tasks.Dataflow.ytwttt7fzh.wasm +0 -0
  270. package/learn/vendor/fantomas/System.Threading.Tasks.Extensions.0deavcb00v.wasm +0 -0
  271. package/learn/vendor/fantomas/System.Threading.Tasks.Parallel.tjwtxugso0.wasm +0 -0
  272. package/learn/vendor/fantomas/System.Threading.Tasks.fu4qd5h3qy.wasm +0 -0
  273. package/learn/vendor/fantomas/System.Threading.Thread.klaua2by9m.wasm +0 -0
  274. package/learn/vendor/fantomas/System.Threading.ThreadPool.mkzm212njz.wasm +0 -0
  275. package/learn/vendor/fantomas/System.Threading.Timer.yp49llu5h2.wasm +0 -0
  276. package/learn/vendor/fantomas/System.Transactions.Local.vz6cgeh4w7.wasm +0 -0
  277. package/learn/vendor/fantomas/System.Transactions.ipwm3rsy66.wasm +0 -0
  278. package/learn/vendor/fantomas/System.ValueTuple.7ol6ljuhx8.wasm +0 -0
  279. package/learn/vendor/fantomas/System.Web.HttpUtility.itlvncjd96.wasm +0 -0
  280. package/learn/vendor/fantomas/System.Web.np8uzzakvl.wasm +0 -0
  281. package/learn/vendor/fantomas/System.Windows.18nzio44t3.wasm +0 -0
  282. package/learn/vendor/fantomas/System.Xml.45jprtg1pa.wasm +0 -0
  283. package/learn/vendor/fantomas/System.Xml.Linq.v9v8udncm1.wasm +0 -0
  284. package/learn/vendor/fantomas/System.Xml.ReaderWriter.a9mr08uzci.wasm +0 -0
  285. package/learn/vendor/fantomas/System.Xml.Serialization.03juoguwgc.wasm +0 -0
  286. package/learn/vendor/fantomas/System.Xml.XDocument.c9dhjnzqjb.wasm +0 -0
  287. package/learn/vendor/fantomas/System.Xml.XPath.XDocument.138b12i1pm.wasm +0 -0
  288. package/learn/vendor/fantomas/System.Xml.XPath.pvxm9341ce.wasm +0 -0
  289. package/learn/vendor/fantomas/System.Xml.XmlDocument.450wsyxvl0.wasm +0 -0
  290. package/learn/vendor/fantomas/System.Xml.XmlSerializer.y3t2n0tce7.wasm +0 -0
  291. package/learn/vendor/fantomas/System.gjriafnqmz.wasm +0 -0
  292. package/learn/vendor/fantomas/WindowsBase.8zsce9qxfb.wasm +0 -0
  293. package/learn/vendor/fantomas/cs/FSharp.Core.resources.9ehmavdel7.wasm +0 -0
  294. package/learn/vendor/fantomas/de/FSharp.Core.resources.2ofmxloa01.wasm +0 -0
  295. package/learn/vendor/fantomas/dotnet.js +1233 -0
  296. package/learn/vendor/fantomas/dotnet.native.b6l13xorvf.js +16 -0
  297. package/learn/vendor/fantomas/dotnet.native.rw4kynp763.wasm +0 -0
  298. package/learn/vendor/fantomas/dotnet.runtime.v06hirbjsv.js +4 -0
  299. package/learn/vendor/fantomas/es/FSharp.Core.resources.hkr5ggb4tr.wasm +0 -0
  300. package/learn/vendor/fantomas/fr/FSharp.Core.resources.43soen28ow.wasm +0 -0
  301. package/learn/vendor/fantomas/icudt_CJK.tjcz0u77k5.dat +0 -0
  302. package/learn/vendor/fantomas/icudt_EFIGS.tptq2av103.dat +0 -0
  303. package/learn/vendor/fantomas/icudt_no_CJK.lfu7j35m59.dat +0 -0
  304. package/learn/vendor/fantomas/it/FSharp.Core.resources.m60n5ls7oq.wasm +0 -0
  305. package/learn/vendor/fantomas/ja/FSharp.Core.resources.o6oof69v14.wasm +0 -0
  306. package/learn/vendor/fantomas/ko/FSharp.Core.resources.q6l4snlu9o.wasm +0 -0
  307. package/learn/vendor/fantomas/mscorlib.8ptuc08eli.wasm +0 -0
  308. package/learn/vendor/fantomas/netstandard.eymp85mooh.wasm +0 -0
  309. package/learn/vendor/fantomas/pl/FSharp.Core.resources.8bni0w6j8b.wasm +0 -0
  310. package/learn/vendor/fantomas/pt-BR/FSharp.Core.resources.k849vqm41u.wasm +0 -0
  311. package/learn/vendor/fantomas/ru/FSharp.Core.resources.jz9rhhtsla.wasm +0 -0
  312. package/learn/vendor/fantomas/tr/FSharp.Core.resources.wn6vbvjm1u.wasm +0 -0
  313. package/learn/vendor/fantomas/zh-Hans/FSharp.Core.resources.z7zzbso094.wasm +0 -0
  314. package/learn/vendor/fantomas/zh-Hant/FSharp.Core.resources.iammfsi7ls.wasm +0 -0
  315. package/learn/vendor/fast-check-LICENSE.txt +21 -0
  316. package/learn/vendor/fast-check.mjs +37 -0
  317. package/learn/vendor/fonts/atkinson-hyperlegible-latin-400-normal.woff2 +0 -0
  318. package/learn/vendor/fonts/atkinson-hyperlegible-latin-700-normal.woff2 +0 -0
  319. package/learn/vendor/fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2 +0 -0
  320. package/learn/vendor/fonts/overpass-latin-600-normal.woff2 +0 -0
  321. package/learn/vendor/fonts/overpass-latin-700-normal.woff2 +0 -0
  322. package/learn/vendor/formatter-licenses/DotNet-LICENSE.txt +23 -0
  323. package/learn/vendor/formatter-licenses/DotNet-THIRD-PARTY-NOTICES.txt +1418 -0
  324. package/learn/vendor/formatter-licenses/FSharp-LICENSE.txt +23 -0
  325. package/learn/vendor/formatter-licenses/Fantomas-LICENSE.txt +202 -0
  326. package/learn/vendor/formatter-licenses/README.md +12 -0
  327. package/learn/vendor/manifest.json +1354 -0
  328. package/learn/vendor/metadata/Browser.Blob.dll +0 -0
  329. package/learn/vendor/metadata/Browser.Dom.dll +0 -0
  330. package/learn/vendor/metadata/Browser.Event.dll +0 -0
  331. package/learn/vendor/metadata/Browser.Gamepad.dll +0 -0
  332. package/learn/vendor/metadata/Browser.WebGL.dll +0 -0
  333. package/learn/vendor/metadata/Browser.WebStorage.dll +0 -0
  334. package/learn/vendor/metadata/FSharp.Core.dll +0 -0
  335. package/learn/vendor/metadata/Fable.Core.dll +0 -0
  336. package/learn/vendor/metadata/Fable.Repl.Lib.dll +0 -0
  337. package/learn/vendor/metadata/System.Collections.Concurrent.dll +0 -0
  338. package/learn/vendor/metadata/System.Collections.dll +0 -0
  339. package/learn/vendor/metadata/System.ComponentModel.Primitives.dll +0 -0
  340. package/learn/vendor/metadata/System.ComponentModel.TypeConverter.dll +0 -0
  341. package/learn/vendor/metadata/System.ComponentModel.dll +0 -0
  342. package/learn/vendor/metadata/System.Console.dll +0 -0
  343. package/learn/vendor/metadata/System.Core.dll +0 -0
  344. package/learn/vendor/metadata/System.Diagnostics.Debug.dll +0 -0
  345. package/learn/vendor/metadata/System.Diagnostics.Tools.dll +0 -0
  346. package/learn/vendor/metadata/System.Diagnostics.Tracing.dll +0 -0
  347. package/learn/vendor/metadata/System.Globalization.dll +0 -0
  348. package/learn/vendor/metadata/System.IO.dll +0 -0
  349. package/learn/vendor/metadata/System.Net.Requests.dll +0 -0
  350. package/learn/vendor/metadata/System.Net.WebClient.dll +0 -0
  351. package/learn/vendor/metadata/System.Numerics.dll +0 -0
  352. package/learn/vendor/metadata/System.Reflection.Extensions.dll +0 -0
  353. package/learn/vendor/metadata/System.Reflection.Metadata.dll +0 -0
  354. package/learn/vendor/metadata/System.Reflection.Primitives.dll +0 -0
  355. package/learn/vendor/metadata/System.Reflection.TypeExtensions.dll +0 -0
  356. package/learn/vendor/metadata/System.Reflection.dll +0 -0
  357. package/learn/vendor/metadata/System.Runtime.Extensions.dll +0 -0
  358. package/learn/vendor/metadata/System.Runtime.InteropServices.dll +0 -0
  359. package/learn/vendor/metadata/System.Runtime.Numerics.dll +0 -0
  360. package/learn/vendor/metadata/System.Runtime.dll +0 -0
  361. package/learn/vendor/metadata/System.Text.Encoding.Extensions.dll +0 -0
  362. package/learn/vendor/metadata/System.Text.Encoding.dll +0 -0
  363. package/learn/vendor/metadata/System.Text.RegularExpressions.dll +0 -0
  364. package/learn/vendor/metadata/System.Threading.Tasks.dll +0 -0
  365. package/learn/vendor/metadata/System.Threading.Thread.dll +0 -0
  366. package/learn/vendor/metadata/System.Threading.dll +0 -0
  367. package/learn/vendor/metadata/System.ValueTuple.dll +0 -0
  368. package/learn/vendor/metadata/System.dll +0 -0
  369. package/learn/vendor/metadata/mscorlib.dll +0 -0
  370. package/learn/vendor/metadata/netstandard.dll +0 -0
  371. package/learn/vendor/monaco-editor-LICENSE.txt +21 -0
  372. package/learn/vendor/prettier/babel.mjs +16 -0
  373. package/learn/vendor/prettier/brace-style.mjs +376 -0
  374. package/learn/vendor/prettier/estree.mjs +44 -0
  375. package/learn/vendor/prettier/standalone.mjs +29 -0
  376. package/learn/vendor/prettier/typescript.mjs +22 -0
  377. package/learn/vendor/prettier-LICENSE.txt +7 -0
  378. package/learn/vendor/prettier-plugin-brace-style-LICENSE.txt +21 -0
  379. package/learn/vendor/typescript-LICENSE.txt +55 -0
  380. package/learn/vendor/typescript-libs.json +1 -0
  381. package/learn/vendor/typescript.mjs +451 -0
  382. package/learn/vendor/zod-LICENSE.txt +21 -0
  383. package/learn/web-format.mjs +8 -0
  384. package/learn.mjs +126 -0
  385. package/lsp.mjs +444 -133
  386. package/mcp.mjs +250 -0
  387. package/native-evidence.mjs +668 -182
  388. package/native-examples.mjs +56 -19
  389. package/native-host.mjs +136 -42
  390. package/native-parsers/clojure.LICENSE +121 -0
  391. package/native-parsers/clojure.wasm +0 -0
  392. package/native-parsers/csharp.LICENSE +21 -0
  393. package/native-parsers/csharp.wasm +0 -0
  394. package/native-parsers/elixir.LICENSE +176 -0
  395. package/native-parsers/elixir.wasm +0 -0
  396. package/native-parsers/erlang.LICENSE +201 -0
  397. package/native-parsers/erlang.wasm +0 -0
  398. package/native-parsers/fsharp.LICENSE +21 -0
  399. package/native-parsers/fsharp.wasm +0 -0
  400. package/native-parsers/gleam.LICENSE +202 -0
  401. package/native-parsers/gleam.wasm +0 -0
  402. package/native-parsers/go.LICENSE +21 -0
  403. package/native-parsers/go.wasm +0 -0
  404. package/native-parsers/groovy.LICENSE +21 -0
  405. package/native-parsers/groovy.wasm +0 -0
  406. package/native-parsers/haskell.LICENSE +21 -0
  407. package/native-parsers/haskell.wasm +0 -0
  408. package/native-parsers/java.LICENSE +21 -0
  409. package/native-parsers/java.wasm +0 -0
  410. package/native-parsers/javascript.LICENSE +21 -0
  411. package/native-parsers/javascript.wasm +0 -0
  412. package/native-parsers/kotlin.LICENSE +9 -0
  413. package/native-parsers/kotlin.wasm +0 -0
  414. package/native-parsers/lock.json +114 -0
  415. package/native-parsers/prolog.LICENSE +21 -0
  416. package/native-parsers/prolog.wasm +0 -0
  417. package/native-parsers/python.LICENSE +21 -0
  418. package/native-parsers/python.wasm +0 -0
  419. package/native-parsers/rust.LICENSE +21 -0
  420. package/native-parsers/rust.wasm +0 -0
  421. package/native-parsers/scala.LICENSE +21 -0
  422. package/native-parsers/scala.wasm +0 -0
  423. package/native-parsers/swift.LICENSE +21 -0
  424. package/native-parsers/swift.wasm +0 -0
  425. package/native-parsers/typescript.LICENSE +21 -0
  426. package/native-parsers/typescript.wasm +0 -0
  427. package/node-events-reporter.mjs +41 -17
  428. package/package.json +5 -3
  429. package/project.mjs +338 -0
  430. package/proof.d.ts +93 -19
  431. package/proof.mjs +1538 -447
  432. package/read-only-hpack.mjs +6 -5
  433. package/scala-build-state.mjs +131 -41
  434. package/scala-coverage.mjs +57 -34
  435. package/scalars.mjs +23 -8
  436. package/templates.mjs +566 -617
  437. package/test-command.mjs +1671 -521
package/project.mjs ADDED
@@ -0,0 +1,338 @@
1
+ // Generated from templates/npm/project.mjs by lawspec-dev generate. Do not edit.
2
+ import path from 'node:path';
3
+ import {fileURLToPath} from 'node:url';
4
+ import {lstat, mkdir, readFile} from 'node:fs/promises';
5
+ import {spawnSync} from 'node:child_process';
6
+ import {initialize} from 'ricestax/setup.mjs';
7
+ import {createCompiler} from './api.mjs';
8
+ import {readManifest, writeManifest, dependencyRanges} from './component.mjs';
9
+ import {resolveDependencies} from './component-packages.mjs';
10
+ import {atomicWrite, collectSources, safePath} from './files.mjs';
11
+ // Rice's Tax owns Canon setup and grammars; its exact npm version is pinned.
12
+ export const canonSetupVersion = '0.3.2';
13
+ const rice = fileURLToPath(import.meta.resolve('ricestax/bin/ricestax.mjs'));
14
+ const cli = fileURLToPath(new URL('./bin/lawspec.mjs', import.meta.url));
15
+ async function exists(file)
16
+ {
17
+ try
18
+ {
19
+ await lstat(file);
20
+ return true;
21
+ }
22
+ catch (error)
23
+ {
24
+ if (error.code === 'ENOENT')
25
+ {
26
+ return false;
27
+ }
28
+ throw error;
29
+ }
30
+ }
31
+ function run(root, file, args, node = true)
32
+ {
33
+ const result = spawnSync(
34
+ node ? process.execPath : file,
35
+ node ? [file, ...args] : args,
36
+ {cwd: root, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024},
37
+ );
38
+ let data;
39
+ try
40
+ {
41
+ data = JSON.parse(result.stdout);
42
+ }
43
+ catch
44
+ {
45
+ /* Canon emits text. */
46
+ }
47
+ return {
48
+ status:
49
+ result.error || result.signal
50
+ ? 'incomplete'
51
+ : result.status === 0
52
+ ? 'passed'
53
+ : result.status === 2
54
+ ? 'incomplete'
55
+ : 'failed',
56
+ exitCode: result.status,
57
+ ...(data === undefined ? {output: result.stdout ?? ''} : {result: data}),
58
+ ...(result.stderr || result.error
59
+ ? {detail: result.error?.message ?? result.stderr}
60
+ : {}),
61
+ };
62
+ }
63
+ async function inspectCanon(root, validate)
64
+ {
65
+ if (!(await exists(path.join(root, 'canon.yaml'))))
66
+ {
67
+ return {
68
+ status: 'incomplete',
69
+ detail: 'No canon.yaml; run lawspec project adopt',
70
+ };
71
+ }
72
+ const config = await readFile(path.join(root, 'canon.yaml'), 'utf8');
73
+ const expected =
74
+ config.match(/^canon:\s*["']?([\d.x]+)/m)?.[1] ??
75
+ config.match(/"canon"\s*:\s*"([\d.x]+)"/)?.[1];
76
+ const binary = process.env.CANON;
77
+ const version = binary
78
+ ? run(root, binary, ['version'], false)
79
+ : run(root, rice, ['canon', 'version']);
80
+ const actual = version.output?.match(/canon\s+(\d+\.\d+\.\d+)/)?.[1];
81
+ if (
82
+ version.status !== 'passed' ||
83
+ !actual ||
84
+ (expected &&
85
+ expected.split('.').slice(0, 2).join('.') !==
86
+ actual.split('.').slice(0, 2).join('.'))
87
+ )
88
+ {
89
+ return {
90
+ status: 'incomplete',
91
+ expectedVersion: expected,
92
+ actualVersion: actual,
93
+ detail:
94
+ 'Canon version unavailable or incompatible. Set CANON to the matching native executable; existing metadata is preserved.',
95
+ };
96
+ }
97
+ const args = [validate ? 'check' : 'decisions'];
98
+ return {
99
+ ...(binary
100
+ ? run(root, binary, args, false)
101
+ : run(root, rice, ['canon', ...args])),
102
+ version: actual,
103
+ };
104
+ }
105
+ export async function setupProject(
106
+ root,
107
+ {adopt = false, languages = ['folio']} = {},
108
+ )
109
+ {
110
+ root = path.resolve(root);
111
+ // Complete preflight before invoking the upstream initializer or writing files.
112
+ for (const old of ['lawspec.json', 'lawspec-package.json'])
113
+ {
114
+ if (await exists(path.join(root, old)))
115
+ {
116
+ throw new Error(`${old} is no longer supported; use lawspec.edn`);
117
+ }
118
+ }
119
+ const hasManifest = await exists(path.join(root, 'lawspec.edn'));
120
+ const hasCanon = await exists(path.join(root, 'canon.yaml'));
121
+ if (!adopt && (hasManifest || hasCanon))
122
+ {
123
+ throw new Error(
124
+ 'Project metadata already exists; use lawspec project adopt',
125
+ );
126
+ }
127
+ if (hasManifest)
128
+ {
129
+ await readManifest(path.join(root, 'lawspec.edn'));
130
+ }
131
+ if (!hasCanon && (await exists(path.join(root, '.ricestax'))))
132
+ {
133
+ throw new Error(
134
+ '.ricestax exists without canon.yaml; review the incomplete Canon setup',
135
+ );
136
+ }
137
+ const manifest = {
138
+ manifestVersion: 1,
139
+ component: {
140
+ name: path.basename(root).replace(/[^A-Za-z0-9_.-]/g, '-'),
141
+ version: '0.1.0',
142
+ },
143
+ languageProfile: '1.0-rc.2',
144
+ verification: {layers: []},
145
+ sources: ['laws'],
146
+ targets: [],
147
+ };
148
+ // A tiny empty unit makes mandatory validation available before choosing a target.
149
+ const starter = !hasManifest && !(await exists(path.join(root, 'laws')));
150
+ await mkdir(root, {recursive: true});
151
+ if (!hasCanon)
152
+ {
153
+ await initialize(root, languages);
154
+ // Upstream setup does not create a decision ledger. Never replace an existing one.
155
+ for (const name of [
156
+ 'canonical_decisions.yaml',
157
+ 'canonical_refs.yaml',
158
+ 'canonical_exemptions.yaml',
159
+ ])
160
+ {
161
+ if (!(await exists(path.join(root, name))))
162
+ {
163
+ await atomicWrite(await safePath(root, name), '{}\n', true);
164
+ }
165
+ }
166
+ }
167
+ if (!hasManifest)
168
+ {
169
+ if (starter)
170
+ {
171
+ await atomicWrite(
172
+ await safePath(root, 'laws/project.lawspec'),
173
+ 'unit project\nend unit\n',
174
+ true,
175
+ );
176
+ }
177
+ await atomicWrite(
178
+ await safePath(root, 'lawspec.edn'),
179
+ writeManifest(manifest),
180
+ true,
181
+ );
182
+ }
183
+ return {
184
+ root,
185
+ manifest: hasManifest ? 'preserved' : 'created',
186
+ canon: hasCanon ? 'preserved' : 'created',
187
+ canonSetup: `ricestax@${canonSetupVersion}`,
188
+ applicationFilesChanged: false,
189
+ };
190
+ }
191
+ export async function inspectProject(
192
+ root,
193
+ {validate = false, configFile = path.join(root, 'lawspec.edn')} = {},
194
+ )
195
+ {
196
+ root = path.resolve(root);
197
+ configFile = path.resolve(configFile);
198
+ const canon = await inspectCanon(root, validate).catch(error => ({
199
+ status: 'incomplete',
200
+ detail: error.message,
201
+ }));
202
+ const report = {root, canon};
203
+ try
204
+ {
205
+ const manifest = await readManifest(configFile);
206
+ const compiler = await createCompiler();
207
+ const dependencies = await resolveDependencies(configFile, manifest, {
208
+ writeLock: false,
209
+ });
210
+ const input = {
211
+ sources: await collectSources(root, manifest.sources),
212
+ languageProfile: manifest.languageProfile,
213
+ machineBits: manifest.machineBits ?? 64,
214
+ packages: dependencies.packages,
215
+ dependencies: dependencyRanges(manifest),
216
+ ...(manifest.package ? {package: manifest.package} : {}),
217
+ projectVersion: manifest.component?.version ?? manifest.package?.version,
218
+ now: new Date().toISOString(),
219
+ };
220
+ const checked = await compiler.check({
221
+ ...input,
222
+ verification: {layers: []},
223
+ });
224
+ report.definitions = {
225
+ status: checked.diagnostics?.length ? 'failed' : 'passed',
226
+ diagnostics: checked.diagnostics ?? [],
227
+ };
228
+ report.verification = {
229
+ layers: manifest.verification?.layers ?? [],
230
+ status: 'not-verified',
231
+ evidence: checked.evidence,
232
+ };
233
+ if (validate && report.definitions.status === 'passed')
234
+ {
235
+ const selected = await compiler.check({
236
+ ...input,
237
+ verification: manifest.verification ?? {layers: []},
238
+ });
239
+ report.verification = {
240
+ layers: manifest.verification?.layers ?? [],
241
+ status: selected.diagnostics?.length
242
+ ? 'failed'
243
+ : manifest.verification?.layers?.length
244
+ ? 'completed'
245
+ : 'not-verified',
246
+ selection: selected.verification,
247
+ diagnostics: selected.diagnostics ?? [],
248
+ evidence: selected.evidence,
249
+ };
250
+ if (report.verification.layers.includes('proof'))
251
+ {
252
+ report.proof = run(root, cli, [
253
+ 'prove',
254
+ '--config',
255
+ configFile,
256
+ '--json',
257
+ ]);
258
+ // Solver discharge settles the previously generated obligations. Keep
259
+ // its original rows, rather than reporting the pre-solver incompleteness.
260
+ if (Array.isArray(report.proof.result?.evidence))
261
+ {
262
+ report.verification.evidence = report.proof.result.evidence;
263
+ }
264
+ }
265
+ if (
266
+ report.verification.layers.some(layer =>
267
+ ['property', 'examples', 'exhaustive', 'model'].includes(layer),
268
+ )
269
+ )
270
+ {
271
+ report.native = manifest.targets?.length
272
+ ? run(root, cli, ['test', '--config', configFile, '--json'])
273
+ : {
274
+ status: 'incomplete',
275
+ detail: 'Selected execution layers have no application target',
276
+ };
277
+ }
278
+ }
279
+ }
280
+ catch (error)
281
+ {
282
+ if (!report.definitions)
283
+ {
284
+ report.definitions = {
285
+ status: 'incomplete',
286
+ detail: error.message,
287
+ diagnostics: error.diagnostics ?? [],
288
+ };
289
+ }
290
+ else
291
+ {
292
+ report.verification = {
293
+ ...report.verification,
294
+ status: 'incomplete',
295
+ detail: error.message,
296
+ };
297
+ }
298
+ }
299
+ return report;
300
+ }
301
+ export function projectExitCode(report)
302
+ {
303
+ if (
304
+ [
305
+ report.canon,
306
+ report.definitions,
307
+ report.verification,
308
+ report.proof,
309
+ report.native,
310
+ ].some(row => row?.status === 'failed')
311
+ )
312
+ {
313
+ return 1;
314
+ }
315
+ const evidence = report.verification?.evidence;
316
+ const rows =
317
+ evidence?.obligations ?? (Array.isArray(evidence) ? evidence : []);
318
+ if (rows.some(row => row.status === 'refuted'))
319
+ {
320
+ return 1;
321
+ }
322
+ if (
323
+ [
324
+ report.canon,
325
+ report.definitions,
326
+ report.verification,
327
+ report.proof,
328
+ report.native,
329
+ ].some(row => row?.status === 'incomplete') ||
330
+ rows.some(row =>
331
+ ['unknown', 'unsupported', 'incomplete', 'pending'].includes(row.status),
332
+ )
333
+ )
334
+ {
335
+ return 2;
336
+ }
337
+ return 0;
338
+ }
package/proof.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  // Generated from templates/npm/proof.d.ts by lawspec-dev generate. Do not edit.
2
- import type {CheckRequest,Compiler,Location,Recursion,Result} from './index.d.ts';
2
+ import type {
3
+ CheckRequest,
4
+ Compiler,
5
+ Location,
6
+ Recursion,
7
+ Result,
8
+ } from './index.d.ts';
3
9
 
4
- export interface Z3Options {
10
+ export interface Z3Options
11
+ {
5
12
  binary?: string;
6
13
  timeoutMs?: number;
7
14
  memoryMb?: number;
@@ -10,12 +17,28 @@ export interface Z3Options {
10
17
  maxOutputBytes?: number;
11
18
  }
12
19
  /** How a solver run went: shared by law and law-set evidence. */
13
- interface SolverRun {
20
+ interface SolverRun
21
+ {
14
22
  /** Current task binding when a semantic result reuses an earlier execution. */
15
23
  currentTaskFingerprint?: string;
16
24
  /** Provenance of the completed execution reused; no fresh solver run occurred. */
17
- reused?: {key:string; owner:string; declaration:string; taskFingerprint:string; runFingerprint:string};
18
- outcome: 'unsat' | 'sat' | 'unknown' | 'timeout' | 'resource-limit' | 'out-of-memory' | 'unavailable' | 'failed' | 'unsupported';
25
+ reused?: {
26
+ key: string;
27
+ owner: string;
28
+ declaration: string;
29
+ taskFingerprint: string;
30
+ runFingerprint: string;
31
+ };
32
+ outcome:
33
+ | 'unsat'
34
+ | 'sat'
35
+ | 'unknown'
36
+ | 'timeout'
37
+ | 'resource-limit'
38
+ | 'out-of-memory'
39
+ | 'unavailable'
40
+ | 'failed'
41
+ | 'unsupported';
19
42
  reason: string;
20
43
  stdout?: string;
21
44
  stderr?: string;
@@ -23,11 +46,19 @@ interface SolverRun {
23
46
  exitCode?: number | null;
24
47
  signal?: string | null;
25
48
  runFingerprint?: string;
26
- prover?: {name:'z3'; version:string; binary:string; binaryFingerprint:string; fingerprint:string; arguments:string[]};
49
+ prover?: {
50
+ name: 'z3';
51
+ version: string;
52
+ binary: string;
53
+ binaryFingerprint: string;
54
+ fingerprint: string;
55
+ arguments: string[];
56
+ };
27
57
  configuration?: Required<Z3Options>;
28
58
  }
29
59
  /** A law's proof task, run by Z3. */
30
- export interface LawSolverEvidence extends SolverRun {
60
+ export interface LawSolverEvidence extends SolverRun
61
+ {
31
62
  kind?: undefined;
32
63
  owner: string;
33
64
  declaration: string;
@@ -37,24 +68,54 @@ export interface LawSolverEvidence extends SolverRun {
37
68
  lawFingerprint: string;
38
69
  taskFingerprint?: string;
39
70
  /** Current names for the same semantic induction plan; original cases remain in induction. */
40
- currentInduction?: {on:string; using:string[]};
71
+ currentInduction?: {on: string; using: string[]};
41
72
  status: 'proved' | 'refuted' | 'incomplete' | 'unsupported';
42
73
  model?: string;
43
74
  modelValidated?: boolean;
44
- counterexample?: {inputs:{name:string;value:string}[]; values:string; fingerprint:string; runFingerprint:string;
45
- check:'refuted'|'model-not-confirmed'|'incomplete'};
75
+ counterexample?: {
76
+ inputs: {name: string; value: string}[];
77
+ values: string;
78
+ fingerprint: string;
79
+ runFingerprint: string;
80
+ check: 'refuted' | 'model-not-confirmed' | 'incomplete';
81
+ };
46
82
  /** For a law over recursive definitions: the encoding of the run reported,
47
83
  and each encoding tried, in order. */
48
84
  recursion?: Recursion;
49
- attempts?: {recursion:Recursion; taskFingerprint:string; outcome:SolverRun['outcome']; runFingerprint?:string; elapsedMs?:number}[];
85
+ attempts?: {
86
+ recursion: Recursion;
87
+ taskFingerprint: string;
88
+ outcome: SolverRun['outcome'];
89
+ runFingerprint?: string;
90
+ elapsedMs?: number;
91
+ }[];
50
92
  /** Induction on an input: the cited laws, and each case's receipt. */
51
- induction?: {on:string; using:string[]; asked?:boolean; cases:{case:string; outcome?:SolverRun['outcome']; recursion?:Recursion;
52
- taskFingerprint?:string; runFingerprint?:string; values?:string; reason?:string;
53
- attempts?:{recursion:Recursion; taskFingerprint:string; outcome:SolverRun['outcome']; runFingerprint?:string; elapsedMs?:number}[]}[]};
93
+ induction?: {
94
+ on: string;
95
+ using: string[];
96
+ asked?: boolean;
97
+ cases: {
98
+ case: string;
99
+ outcome?: SolverRun['outcome'];
100
+ recursion?: Recursion;
101
+ taskFingerprint?: string;
102
+ runFingerprint?: string;
103
+ values?: string;
104
+ reason?: string;
105
+ attempts?: {
106
+ recursion: Recursion;
107
+ taskFingerprint: string;
108
+ outcome: SolverRun['outcome'];
109
+ runFingerprint?: string;
110
+ elapsedMs?: number;
111
+ }[];
112
+ }[];
113
+ };
54
114
  }
55
115
  /** A law-set check's task (completeness, overlap, conflict or vacuity).
56
116
  status is the task's own result; check is its row's. */
57
- export interface AnalysisSolverEvidence extends SolverRun {
117
+ export interface AnalysisSolverEvidence extends SolverRun
118
+ {
58
119
  kind: 'analysis';
59
120
  owner: string;
60
121
  declaration: string;
@@ -69,7 +130,8 @@ export interface AnalysisSolverEvidence extends SolverRun {
69
130
  }
70
131
  /** A model law's task: induction, Spacer, an invariant re-check or the
71
132
  bounded run search; the law's own row says what they settled. */
72
- export interface ModelSolverEvidence extends SolverRun {
133
+ export interface ModelSolverEvidence extends SolverRun
134
+ {
73
135
  kind: 'model';
74
136
  owner: string;
75
137
  declaration: string;
@@ -81,6 +143,18 @@ export interface ModelSolverEvidence extends SolverRun {
81
143
  modelValidated?: undefined;
82
144
  counterexample?: undefined;
83
145
  }
84
- export type SolverEvidence = LawSolverEvidence | AnalysisSolverEvidence | ModelSolverEvidence;
85
- export function proofTaskFingerprint(task: {encoding:string;lawFingerprint:string;machineBits:number;owner:string;declaration:string;script:string}):string;
86
- export function proveWithZ3(compiler:Compiler,request:CheckRequest,options?:Z3Options):Promise<Result & {solverEvidence:SolverEvidence[]}>;
146
+ export type SolverEvidence =
147
+ LawSolverEvidence | AnalysisSolverEvidence | ModelSolverEvidence;
148
+ export function proofTaskFingerprint(task: {
149
+ encoding: string;
150
+ lawFingerprint: string;
151
+ machineBits: number;
152
+ owner: string;
153
+ declaration: string;
154
+ script: string;
155
+ }): string;
156
+ export function proveWithZ3(
157
+ compiler: Compiler,
158
+ request: CheckRequest,
159
+ options?: Z3Options,
160
+ ): Promise<Result & {solverEvidence: SolverEvidence[]}>;