veralang 0.1.5__tar.gz

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 (239) hide show
  1. veralang-0.1.5/LICENSE +21 -0
  2. veralang-0.1.5/PKG-INFO +126 -0
  3. veralang-0.1.5/PYPI_README.md +83 -0
  4. veralang-0.1.5/README.md +347 -0
  5. veralang-0.1.5/pyproject.toml +309 -0
  6. veralang-0.1.5/setup.cfg +4 -0
  7. veralang-0.1.5/tests/test_adt_eq_reject_928.py +447 -0
  8. veralang-0.1.5/tests/test_adt_float64_eq_871.py +306 -0
  9. veralang-0.1.5/tests/test_adt_ord_reject_921.py +676 -0
  10. veralang-0.1.5/tests/test_array_map_slot_closure_1056.py +227 -0
  11. veralang-0.1.5/tests/test_ast.py +1122 -0
  12. veralang-0.1.5/tests/test_browser.py +3057 -0
  13. veralang-0.1.5/tests/test_build_site.py +341 -0
  14. veralang-0.1.5/tests/test_builtin_typevar_collision_970.py +811 -0
  15. veralang-0.1.5/tests/test_check_changelog_updated.py +711 -0
  16. veralang-0.1.5/tests/test_check_doc_counts.py +187 -0
  17. veralang-0.1.5/tests/test_check_explicit_encoding.py +254 -0
  18. veralang-0.1.5/tests/test_check_limitations_sync.py +107 -0
  19. veralang-0.1.5/tests/test_check_walker_coverage_597.py +311 -0
  20. veralang-0.1.5/tests/test_checker_apply_fn.py +454 -0
  21. veralang-0.1.5/tests/test_checker_builtins_collections.py +848 -0
  22. veralang-0.1.5/tests/test_checker_builtins_strings.py +945 -0
  23. veralang-0.1.5/tests/test_checker_effects.py +1066 -0
  24. veralang-0.1.5/tests/test_checker_errors.py +866 -0
  25. veralang-0.1.5/tests/test_checker_functions.py +984 -0
  26. veralang-0.1.5/tests/test_checker_int_nat.py +153 -0
  27. veralang-0.1.5/tests/test_checker_modules.py +975 -0
  28. veralang-0.1.5/tests/test_checker_patterns.py +936 -0
  29. veralang-0.1.5/tests/test_checker_types.py +3063 -0
  30. veralang-0.1.5/tests/test_cli.py +4142 -0
  31. veralang-0.1.5/tests/test_codegen_alias_of_adt_eq_show_1085.py +1140 -0
  32. veralang-0.1.5/tests/test_codegen_alias_typeargs_eq_1076.py +499 -0
  33. veralang-0.1.5/tests/test_codegen_arrays.py +4472 -0
  34. veralang-0.1.5/tests/test_codegen_calls.py +1403 -0
  35. veralang-0.1.5/tests/test_codegen_closures.py +2000 -0
  36. veralang-0.1.5/tests/test_codegen_collections.py +1132 -0
  37. veralang-0.1.5/tests/test_codegen_contracts.py +601 -0
  38. veralang-0.1.5/tests/test_codegen_coverage.py +244 -0
  39. veralang-0.1.5/tests/test_codegen_data_types.py +1870 -0
  40. veralang-0.1.5/tests/test_codegen_decimal.py +780 -0
  41. veralang-0.1.5/tests/test_codegen_effects.py +2324 -0
  42. veralang-0.1.5/tests/test_codegen_erased_alias_typeargs_1070.py +398 -0
  43. veralang-0.1.5/tests/test_codegen_expressions.py +787 -0
  44. veralang-0.1.5/tests/test_codegen_gc_alloc.py +892 -0
  45. veralang-0.1.5/tests/test_codegen_gc_reclamation.py +706 -0
  46. veralang-0.1.5/tests/test_codegen_gc_rooting.py +1576 -0
  47. veralang-0.1.5/tests/test_codegen_host_effects.py +964 -0
  48. veralang-0.1.5/tests/test_codegen_infrastructure.py +456 -0
  49. veralang-0.1.5/tests/test_codegen_interpolation.py +1275 -0
  50. veralang-0.1.5/tests/test_codegen_invariant_e699.py +216 -0
  51. veralang-0.1.5/tests/test_codegen_io.py +824 -0
  52. veralang-0.1.5/tests/test_codegen_json.py +984 -0
  53. veralang-0.1.5/tests/test_codegen_modules.py +3111 -0
  54. veralang-0.1.5/tests/test_codegen_monomorphize.py +4901 -0
  55. veralang-0.1.5/tests/test_codegen_nat_guards.py +1326 -0
  56. veralang-0.1.5/tests/test_codegen_nested_nullary_ctor_994.py +229 -0
  57. veralang-0.1.5/tests/test_codegen_numeric.py +1104 -0
  58. veralang-0.1.5/tests/test_codegen_refinements.py +1208 -0
  59. veralang-0.1.5/tests/test_codegen_string_builtins.py +1395 -0
  60. veralang-0.1.5/tests/test_codegen_strings.py +1275 -0
  61. veralang-0.1.5/tests/test_codegen_structural_eq.py +1371 -0
  62. veralang-0.1.5/tests/test_codegen_translator_fixes.py +528 -0
  63. veralang-0.1.5/tests/test_codegen_typeparam_unit_wildcard_1060.py +959 -0
  64. veralang-0.1.5/tests/test_codegen_where_helper_mangling_991.py +553 -0
  65. veralang-0.1.5/tests/test_codegen_zero_size_fields_1043.py +463 -0
  66. veralang-0.1.5/tests/test_composite_postcondition_eq_912.py +492 -0
  67. veralang-0.1.5/tests/test_conformance.py +124 -0
  68. veralang-0.1.5/tests/test_contract_predicate_degradation_922.py +250 -0
  69. veralang-0.1.5/tests/test_diagnostic_fields.py +1436 -0
  70. veralang-0.1.5/tests/test_doc_annotations.py +340 -0
  71. veralang-0.1.5/tests/test_doc_builtin_shadowing.py +107 -0
  72. veralang-0.1.5/tests/test_eq_contract_874.py +430 -0
  73. veralang-0.1.5/tests/test_errors.py +657 -0
  74. veralang-0.1.5/tests/test_execute_characterization.py +510 -0
  75. veralang-0.1.5/tests/test_float64_builtins_807.py +491 -0
  76. veralang-0.1.5/tests/test_float64_fp.py +204 -0
  77. veralang-0.1.5/tests/test_formatter.py +1074 -0
  78. veralang-0.1.5/tests/test_generic_where_helper_990.py +339 -0
  79. veralang-0.1.5/tests/test_hetero_widen_tailcall.py +312 -0
  80. veralang-0.1.5/tests/test_html.py +164 -0
  81. veralang-0.1.5/tests/test_int_overflow.py +143 -0
  82. veralang-0.1.5/tests/test_int_overflow_codegen.py +716 -0
  83. veralang-0.1.5/tests/test_int_overflow_differential.py +398 -0
  84. veralang-0.1.5/tests/test_int_widening_codegen.py +535 -0
  85. veralang-0.1.5/tests/test_int_widening_differential.py +320 -0
  86. veralang-0.1.5/tests/test_introspect.py +192 -0
  87. veralang-0.1.5/tests/test_lsp.py +1211 -0
  88. veralang-0.1.5/tests/test_markdown.py +393 -0
  89. veralang-0.1.5/tests/test_monomorphize_differential.py +1719 -0
  90. veralang-0.1.5/tests/test_mutual_recursive_sorts_881.py +317 -0
  91. veralang-0.1.5/tests/test_nat_int_widening.py +576 -0
  92. veralang-0.1.5/tests/test_nat_narrowing_return_differential.py +1362 -0
  93. veralang-0.1.5/tests/test_obligations.py +1521 -0
  94. veralang-0.1.5/tests/test_parser.py +973 -0
  95. veralang-0.1.5/tests/test_prelude.py +422 -0
  96. veralang-0.1.5/tests/test_prelude_diagnostics.py +271 -0
  97. veralang-0.1.5/tests/test_readme.py +79 -0
  98. veralang-0.1.5/tests/test_release.py +566 -0
  99. veralang-0.1.5/tests/test_resolver.py +602 -0
  100. veralang-0.1.5/tests/test_runtime_traps.py +2761 -0
  101. veralang-0.1.5/tests/test_serve.py +189 -0
  102. veralang-0.1.5/tests/test_soundness_392.py +584 -0
  103. veralang-0.1.5/tests/test_state_clause_semantics.py +696 -0
  104. veralang-0.1.5/tests/test_stress.py +553 -0
  105. veralang-0.1.5/tests/test_string_length_soundness.py +278 -0
  106. veralang-0.1.5/tests/test_tester.py +445 -0
  107. veralang-0.1.5/tests/test_tester_artifacts.py +89 -0
  108. veralang-0.1.5/tests/test_tester_coverage.py +942 -0
  109. veralang-0.1.5/tests/test_types.py +443 -0
  110. veralang-0.1.5/tests/test_verifier_adt_decreases.py +680 -0
  111. veralang-0.1.5/tests/test_verifier_calls_modules.py +1514 -0
  112. veralang-0.1.5/tests/test_verifier_contracts.py +898 -0
  113. veralang-0.1.5/tests/test_verifier_coverage.py +1651 -0
  114. veralang-0.1.5/tests/test_verifier_mutation_gates_smt.py +1317 -0
  115. veralang-0.1.5/tests/test_verifier_mutation_obligations.py +883 -0
  116. veralang-0.1.5/tests/test_verifier_nat_obligations.py +1620 -0
  117. veralang-0.1.5/tests/test_verifier_nested_ctor_sort_918.py +441 -0
  118. veralang-0.1.5/tests/test_verifier_nullary_ctor_sort_994.py +227 -0
  119. veralang-0.1.5/tests/test_verifier_primitive_ops.py +658 -0
  120. veralang-0.1.5/tests/test_verifier_refinements.py +1462 -0
  121. veralang-0.1.5/tests/test_verifier_shadow_audits.py +1372 -0
  122. veralang-0.1.5/tests/test_verifier_sort_name_collision_884.py +203 -0
  123. veralang-0.1.5/tests/test_verifier_where_helper_scope_991.py +235 -0
  124. veralang-0.1.5/tests/test_walker_defensive_branches_597.py +296 -0
  125. veralang-0.1.5/tests/test_wasi_target.py +2118 -0
  126. veralang-0.1.5/tests/test_wasm.py +344 -0
  127. veralang-0.1.5/tests/test_wasm_coverage.py +3976 -0
  128. veralang-0.1.5/tests/test_xmod_ability_ops_992.py +156 -0
  129. veralang-0.1.5/tests/test_xmod_artifact_collection.py +147 -0
  130. veralang-0.1.5/tests/test_xmod_generic_widen_gap.py +411 -0
  131. veralang-0.1.5/tests/test_xmod_span_collision.py +156 -0
  132. veralang-0.1.5/tests/test_xmod_where_helper_import_991.py +190 -0
  133. veralang-0.1.5/tests/test_xmod_widening_differential.py +291 -0
  134. veralang-0.1.5/vera/__init__.py +4 -0
  135. veralang-0.1.5/vera/_since.py +203 -0
  136. veralang-0.1.5/vera/ast.py +875 -0
  137. veralang-0.1.5/vera/browser/__init__.py +1 -0
  138. veralang-0.1.5/vera/browser/emit.py +137 -0
  139. veralang-0.1.5/vera/browser/harness.mjs +106 -0
  140. veralang-0.1.5/vera/browser/runtime.mjs +3272 -0
  141. veralang-0.1.5/vera/checker/__init__.py +5 -0
  142. veralang-0.1.5/vera/checker/calls.py +1362 -0
  143. veralang-0.1.5/vera/checker/control.py +620 -0
  144. veralang-0.1.5/vera/checker/core.py +914 -0
  145. veralang-0.1.5/vera/checker/eq_ability.py +199 -0
  146. veralang-0.1.5/vera/checker/expressions.py +1328 -0
  147. veralang-0.1.5/vera/checker/modules.py +180 -0
  148. veralang-0.1.5/vera/checker/registration.py +456 -0
  149. veralang-0.1.5/vera/checker/resolution.py +419 -0
  150. veralang-0.1.5/vera/cli.py +1766 -0
  151. veralang-0.1.5/vera/codegen/__init__.py +27 -0
  152. veralang-0.1.5/vera/codegen/api.py +1333 -0
  153. veralang-0.1.5/vera/codegen/assembly.py +1429 -0
  154. veralang-0.1.5/vera/codegen/closures.py +876 -0
  155. veralang-0.1.5/vera/codegen/compilability.py +538 -0
  156. veralang-0.1.5/vera/codegen/contracts.py +810 -0
  157. veralang-0.1.5/vera/codegen/core.py +1948 -0
  158. veralang-0.1.5/vera/codegen/functions.py +1072 -0
  159. veralang-0.1.5/vera/codegen/memory.py +105 -0
  160. veralang-0.1.5/vera/codegen/modules.py +897 -0
  161. veralang-0.1.5/vera/codegen/monomorphize.py +1369 -0
  162. veralang-0.1.5/vera/codegen/registration.py +479 -0
  163. veralang-0.1.5/vera/codegen/tail_position.py +106 -0
  164. veralang-0.1.5/vera/codegen/wasi.py +4819 -0
  165. veralang-0.1.5/vera/environment.py +2061 -0
  166. veralang-0.1.5/vera/errors.py +584 -0
  167. veralang-0.1.5/vera/formatter.py +1122 -0
  168. veralang-0.1.5/vera/grammar.lark +343 -0
  169. veralang-0.1.5/vera/introspect.py +129 -0
  170. veralang-0.1.5/vera/lsp/__init__.py +9 -0
  171. veralang-0.1.5/vera/lsp/convert.py +144 -0
  172. veralang-0.1.5/vera/lsp/documents.py +69 -0
  173. veralang-0.1.5/vera/lsp/extensions.py +146 -0
  174. veralang-0.1.5/vera/lsp/features.py +300 -0
  175. veralang-0.1.5/vera/lsp/server.py +287 -0
  176. veralang-0.1.5/vera/lsp/workflows.py +442 -0
  177. veralang-0.1.5/vera/markdown.py +651 -0
  178. veralang-0.1.5/vera/monomorphize.py +2314 -0
  179. veralang-0.1.5/vera/obligations/__init__.py +57 -0
  180. veralang-0.1.5/vera/obligations/cache.py +219 -0
  181. veralang-0.1.5/vera/obligations/core.py +164 -0
  182. veralang-0.1.5/vera/obligations/session.py +274 -0
  183. veralang-0.1.5/vera/parser.py +153 -0
  184. veralang-0.1.5/vera/prelude.py +927 -0
  185. veralang-0.1.5/vera/registration.py +126 -0
  186. veralang-0.1.5/vera/resolver.py +332 -0
  187. veralang-0.1.5/vera/runtime/__init__.py +22 -0
  188. veralang-0.1.5/vera/runtime/async_http.py +138 -0
  189. veralang-0.1.5/vera/runtime/collections.py +16 -0
  190. veralang-0.1.5/vera/runtime/decimal.py +333 -0
  191. veralang-0.1.5/vera/runtime/heap.py +1208 -0
  192. veralang-0.1.5/vera/runtime/html.py +325 -0
  193. veralang-0.1.5/vera/runtime/http.py +155 -0
  194. veralang-0.1.5/vera/runtime/inference.py +198 -0
  195. veralang-0.1.5/vera/runtime/json.py +95 -0
  196. veralang-0.1.5/vera/runtime/map.py +308 -0
  197. veralang-0.1.5/vera/runtime/math.py +94 -0
  198. veralang-0.1.5/vera/runtime/md.py +153 -0
  199. veralang-0.1.5/vera/runtime/random.py +61 -0
  200. veralang-0.1.5/vera/runtime/regex.py +148 -0
  201. veralang-0.1.5/vera/runtime/server.py +150 -0
  202. veralang-0.1.5/vera/runtime/set.py +184 -0
  203. veralang-0.1.5/vera/runtime/state.py +98 -0
  204. veralang-0.1.5/vera/runtime/text.py +34 -0
  205. veralang-0.1.5/vera/runtime/traps.py +493 -0
  206. veralang-0.1.5/vera/runtime/wasi_host.py +213 -0
  207. veralang-0.1.5/vera/skip.py +217 -0
  208. veralang-0.1.5/vera/slots.py +162 -0
  209. veralang-0.1.5/vera/smt.py +2877 -0
  210. veralang-0.1.5/vera/tester.py +992 -0
  211. veralang-0.1.5/vera/transform.py +1455 -0
  212. veralang-0.1.5/vera/types.py +662 -0
  213. veralang-0.1.5/vera/verifier.py +7321 -0
  214. veralang-0.1.5/vera/wasm/__init__.py +6 -0
  215. veralang-0.1.5/vera/wasm/async_fusion.py +326 -0
  216. veralang-0.1.5/vera/wasm/calls.py +1139 -0
  217. veralang-0.1.5/vera/wasm/calls_arrays.py +2694 -0
  218. veralang-0.1.5/vera/wasm/calls_containers.py +1304 -0
  219. veralang-0.1.5/vera/wasm/calls_encoding.py +2210 -0
  220. veralang-0.1.5/vera/wasm/calls_handlers.py +1818 -0
  221. veralang-0.1.5/vera/wasm/calls_markup.py +400 -0
  222. veralang-0.1.5/vera/wasm/calls_math.py +635 -0
  223. veralang-0.1.5/vera/wasm/calls_parsing.py +1035 -0
  224. veralang-0.1.5/vera/wasm/calls_strings.py +4185 -0
  225. veralang-0.1.5/vera/wasm/closures.py +551 -0
  226. veralang-0.1.5/vera/wasm/context.py +1084 -0
  227. veralang-0.1.5/vera/wasm/data.py +1510 -0
  228. veralang-0.1.5/vera/wasm/helpers.py +463 -0
  229. veralang-0.1.5/vera/wasm/html_serde.py +261 -0
  230. veralang-0.1.5/vera/wasm/inference.py +2477 -0
  231. veralang-0.1.5/vera/wasm/json_serde.py +265 -0
  232. veralang-0.1.5/vera/wasm/markdown.py +651 -0
  233. veralang-0.1.5/vera/wasm/operators.py +2803 -0
  234. veralang-0.1.5/veralang.egg-info/PKG-INFO +126 -0
  235. veralang-0.1.5/veralang.egg-info/SOURCES.txt +237 -0
  236. veralang-0.1.5/veralang.egg-info/dependency_links.txt +1 -0
  237. veralang-0.1.5/veralang.egg-info/entry_points.txt +2 -0
  238. veralang-0.1.5/veralang.egg-info/requires.txt +23 -0
  239. veralang-0.1.5/veralang.egg-info/top_level.txt +1 -0
veralang-0.1.5/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alasdair Allan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.4
2
+ Name: veralang
3
+ Version: 0.1.5
4
+ Summary: Vera: a programming language designed for LLMs, with full contracts, algebraic effects, and typed slot references
5
+ Author-email: Alasdair Allan <alasdair@babilim.co.uk>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://veralang.dev
8
+ Project-URL: Documentation, https://veralang.dev
9
+ Project-URL: Repository, https://github.com/aallan/vera
10
+ Project-URL: Issues, https://github.com/aallan/vera/issues
11
+ Project-URL: Changelog, https://github.com/aallan/vera/blob/main/CHANGELOG.md
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development :: Compilers
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: lark>=1.3.1
23
+ Requires-Dist: z3-solver>=4.15.5
24
+ Requires-Dist: wasmtime>=46.0.1
25
+ Provides-Extra: lsp
26
+ Requires-Dist: pygls>=2.0; extra == "lsp"
27
+ Requires-Dist: lsprotocol>=2023.0; extra == "lsp"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=9.1.1; extra == "dev"
30
+ Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
31
+ Requires-Dist: pytest-xdist>=3.6; extra == "dev"
32
+ Requires-Dist: mypy>=2.3.0; extra == "dev"
33
+ Requires-Dist: ruff>=0.15.21; extra == "dev"
34
+ Requires-Dist: pre-commit>=4.6.0; extra == "dev"
35
+ Requires-Dist: pip-licenses>=5.5.5; extra == "dev"
36
+ Requires-Dist: veralang[lsp]; extra == "dev"
37
+ Provides-Extra: mutation
38
+ Requires-Dist: veralang[dev]; extra == "mutation"
39
+ Requires-Dist: mutmut>=3.6; extra == "mutation"
40
+ Requires-Dist: pytest-timeout>=2.4; extra == "mutation"
41
+ Requires-Dist: matplotlib>=3.7; extra == "mutation"
42
+ Dynamic: license-file
43
+
44
+ # Vera
45
+
46
+ Vera is a programming language designed for large language models to write. It
47
+ has mandatory contracts, algebraic effects, typed slot references instead of
48
+ variable names, and a compiler that emits WebAssembly.
49
+
50
+ Full documentation, examples, and the language specification are available at
51
+ [veralang.dev](https://veralang.dev) and in the
52
+ [GitHub repository](https://github.com/aallan/vera).
53
+
54
+ ## Install a released version
55
+
56
+ Vera requires Python 3.11 or later. Create a virtual environment and install
57
+ the `veralang` distribution:
58
+
59
+ ```bash
60
+ python -m venv .venv
61
+ source .venv/bin/activate
62
+ python -m pip install veralang
63
+ ```
64
+
65
+ On Windows, activate the environment with `.venv\Scripts\activate` instead.
66
+ For editor and agent integration through the language server, install the LSP
67
+ extra:
68
+
69
+ ```bash
70
+ python -m pip install "veralang[lsp]"
71
+ ```
72
+
73
+ The distribution is named `veralang`, but the installed command remains
74
+ `vera`, and Python code still imports it as `import vera`. **Do not run `pip install vera`**: that name belongs to an unrelated
75
+ ERAV citizen-science project on PyPI. The wheel ships the compiler and the
76
+ `vera` command only — the bundled examples, the conformance suite, and the
77
+ specification live in the GitHub repository.
78
+
79
+ ## Install from GitHub source
80
+
81
+ The source route provides the full environment — the examples, conformance
82
+ programs, and specification alongside the toolchain (the recommended setup for
83
+ agents learning the language) — and remains the route for compiler
84
+ development, unreleased changes, and testing the current `main` branch:
85
+
86
+ ```bash
87
+ git clone https://github.com/aallan/vera.git
88
+ cd vera
89
+ python -m venv .venv
90
+ source .venv/bin/activate
91
+ python -m pip install -e .
92
+ ```
93
+
94
+ Use `python -m pip install -e ".[lsp]"` for the language server or
95
+ `python -m pip install -e ".[dev]"` when working on the compiler.
96
+
97
+ ## Try it
98
+
99
+ ```vera
100
+ public fn safe_divide(@Int, @Int -> @Int)
101
+ requires(@Int.1 != 0)
102
+ ensures(@Int.result == @Int.0 / @Int.1)
103
+ effects(pure)
104
+ {
105
+ @Int.0 / @Int.1
106
+ }
107
+
108
+ public fn main(-> @Int)
109
+ requires(true)
110
+ ensures(@Int.result == 5)
111
+ effects(pure)
112
+ {
113
+ safe_divide(2, 10)
114
+ }
115
+ ```
116
+
117
+ ```bash
118
+ vera check program.vera
119
+ vera verify program.vera # proves main returns 5 from safe_divide's contract
120
+ vera run program.vera # prints 5
121
+ ```
122
+
123
+ See the [CLI cookbook](https://github.com/aallan/vera/blob/main/TOOLCHAIN.md),
124
+ [language reference](https://veralang.dev/SKILL.md),
125
+ [supported-platform policy](https://github.com/aallan/vera#supported-platforms),
126
+ and [issue tracker](https://github.com/aallan/vera/issues) for more.
@@ -0,0 +1,83 @@
1
+ # Vera
2
+
3
+ Vera is a programming language designed for large language models to write. It
4
+ has mandatory contracts, algebraic effects, typed slot references instead of
5
+ variable names, and a compiler that emits WebAssembly.
6
+
7
+ Full documentation, examples, and the language specification are available at
8
+ [veralang.dev](https://veralang.dev) and in the
9
+ [GitHub repository](https://github.com/aallan/vera).
10
+
11
+ ## Install a released version
12
+
13
+ Vera requires Python 3.11 or later. Create a virtual environment and install
14
+ the `veralang` distribution:
15
+
16
+ ```bash
17
+ python -m venv .venv
18
+ source .venv/bin/activate
19
+ python -m pip install veralang
20
+ ```
21
+
22
+ On Windows, activate the environment with `.venv\Scripts\activate` instead.
23
+ For editor and agent integration through the language server, install the LSP
24
+ extra:
25
+
26
+ ```bash
27
+ python -m pip install "veralang[lsp]"
28
+ ```
29
+
30
+ The distribution is named `veralang`, but the installed command remains
31
+ `vera`, and Python code still imports it as `import vera`. **Do not run `pip install vera`**: that name belongs to an unrelated
32
+ ERAV citizen-science project on PyPI. The wheel ships the compiler and the
33
+ `vera` command only — the bundled examples, the conformance suite, and the
34
+ specification live in the GitHub repository.
35
+
36
+ ## Install from GitHub source
37
+
38
+ The source route provides the full environment — the examples, conformance
39
+ programs, and specification alongside the toolchain (the recommended setup for
40
+ agents learning the language) — and remains the route for compiler
41
+ development, unreleased changes, and testing the current `main` branch:
42
+
43
+ ```bash
44
+ git clone https://github.com/aallan/vera.git
45
+ cd vera
46
+ python -m venv .venv
47
+ source .venv/bin/activate
48
+ python -m pip install -e .
49
+ ```
50
+
51
+ Use `python -m pip install -e ".[lsp]"` for the language server or
52
+ `python -m pip install -e ".[dev]"` when working on the compiler.
53
+
54
+ ## Try it
55
+
56
+ ```vera
57
+ public fn safe_divide(@Int, @Int -> @Int)
58
+ requires(@Int.1 != 0)
59
+ ensures(@Int.result == @Int.0 / @Int.1)
60
+ effects(pure)
61
+ {
62
+ @Int.0 / @Int.1
63
+ }
64
+
65
+ public fn main(-> @Int)
66
+ requires(true)
67
+ ensures(@Int.result == 5)
68
+ effects(pure)
69
+ {
70
+ safe_divide(2, 10)
71
+ }
72
+ ```
73
+
74
+ ```bash
75
+ vera check program.vera
76
+ vera verify program.vera # proves main returns 5 from safe_divide's contract
77
+ vera run program.vera # prints 5
78
+ ```
79
+
80
+ See the [CLI cookbook](https://github.com/aallan/vera/blob/main/TOOLCHAIN.md),
81
+ [language reference](https://veralang.dev/SKILL.md),
82
+ [supported-platform policy](https://github.com/aallan/vera#supported-platforms),
83
+ and [issue tracker](https://github.com/aallan/vera/issues) for more.
@@ -0,0 +1,347 @@
1
+ # Vera
2
+
3
+ [![Vera — A language designed for machines to write](assets/vera-social-preview.jpg)](https://veralang.dev)
4
+
5
+ [![CI](https://github.com/aallan/vera/actions/workflows/ci.yml/badge.svg)](https://github.com/aallan/vera/actions/workflows/ci.yml)
6
+ [![codecov](https://codecov.io/gh/aallan/vera/graph/badge.svg)](https://codecov.io/gh/aallan/vera)
7
+ [![Mutation score](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/aallan/vera/main/mutation.json)](https://github.com/aallan/vera/issues/387)
8
+
9
+ **Vera** (v-ERR-a) is a programming language designed for large language models to write. The name comes from the Latin *veritas* (truth). Programs compile to WebAssembly and run at the command line, in the browser, or — experimentally — on stock WASI Preview 2 hosts.
10
+
11
+ ```vera
12
+ public fn safe_divide(@Int, @Int -> @Int)
13
+ requires(@Int.1 != 0)
14
+ ensures(@Int.result == @Int.0 / @Int.1)
15
+ effects(pure)
16
+ {
17
+ @Int.0 / @Int.1
18
+ }
19
+ ```
20
+
21
+ There are no variable names. `@Int.0` is the most recent `Int` binding; `@Int.1` is the one before. The `requires` clause is a precondition the compiler checks at every call site. The `ensures` clause is a postcondition the SMT solver proves statically. The function is `pure` — no side effects of any kind. If any of this is wrong, the code does not compile.
22
+
23
+ ## Why?
24
+
25
+ Programming languages have always co-evolved with their users. Assembly emerged from hardware constraints. C from operating systems. Python from productivity needs. If models become the primary authors of code, it follows that languages should adapt to that too.
26
+
27
+ The evidence suggests the biggest problem models face isn't syntax, instead it's coherence over scale. Models struggle with maintaining invariants across a codebase, understanding the ripple effects of changes, and reasoning about state over time. They're pattern matchers optimising for local plausibility, not architects holding the entire system in mind. The [empirical literature](https://arxiv.org/abs/2307.12488) shows that models are particularly vulnerable to naming-related errors like choosing misleading names, reusing names incorrectly, and losing track of which name refers to which value.
28
+
29
+ Vera addresses this by making everything explicit and verifiable. The model doesn't need to be right, it needs to be checkable. Names are replaced by structural references. Contracts are mandatory. Effects are typed. Every function is a specification that the compiler can verify against its implementation.
30
+
31
+ See the **[FAQ](FAQ.md)** for deeper questions about the design — why no variable names, what gets verified, how Vera compares to Dafny/Lean/Koka/F*, and the empirical evidence behind the design choices.
32
+
33
+ ## What Vera looks like
34
+
35
+ Three examples that show what makes Vera different. For the full tour — contracts, refinement types, ADTs, effects, exception handling, recursion, Markdown, JSON, HTML, HTTP, LLM inference — see **[EXAMPLES.md](EXAMPLES.md)**.
36
+
37
+ ### Contracts the compiler proves
38
+
39
+ A precondition like `requires(@Int.1 != 0)` becomes a static obligation: the SMT solver proves it holds at every call site, or refuses to compile. A program that calls `safe_divide` with a divisor the verifier can't prove non-zero is a compile error, not a runtime error.
40
+
41
+ ```vera
42
+ public fn safe_divide(@Int, @Int -> @Int)
43
+ requires(@Int.1 != 0)
44
+ ensures(@Int.result == @Int.0 / @Int.1)
45
+ effects(pure)
46
+ {
47
+ @Int.0 / @Int.1
48
+ }
49
+ ```
50
+
51
+ The compiler synthesises the same obligations for primitive operations themselves. Computing `@Int.1 / @Int.0` where the verifier finds the divisor can be zero is now a compile error (E526), not a runtime trap (an opaque or untranslatable divisor it can neither prove non-zero nor witness a zero for stays Tier 3, guarded at runtime by the zero-divisor trap); an array index is proved in bounds where the length is statically known, a compile error (E527) where provably out of bounds, and otherwise bounds-checked at runtime; `@Nat` subtraction underflow and `@Int` → `@Nat` narrowing are checked the same way. So a division or array index that `vera verify` reports as proven is safe for all inputs; where it can't prove one — an opaque divisor, a dynamic array length, or an op inside a closure body — the runtime guard catches it rather than silently producing a wrong value. (Float division is exempt: divide-by-zero yields inf/NaN, not a trap.)
52
+
53
+ ### Effects are explicit
54
+
55
+ Vera is pure by default. A function that calls an LLM says so in its signature. A caller that doesn't permit `<Inference>` cannot invoke it. A caller that doesn't permit `<Http>` cannot invoke it either. Both callers must declare the full effect row.
56
+
57
+ ```vera
58
+ public fn research_topic(@String -> @Result<String, String>)
59
+ requires(string_length(@String.0) > 0)
60
+ ensures(true)
61
+ effects(<Http, Inference>)
62
+ {
63
+ let @Result<String, String> = Http.get(
64
+ string_concat("https://search.example.com/?q=", @String.0));
65
+ match @Result<String, String>.0 {
66
+ Ok(@String) -> Inference.complete(
67
+ string_concat("Summarise this research:\n\n", @String.0)),
68
+ Err(@String) -> Err(@String.0)
69
+ }
70
+ }
71
+ ```
72
+
73
+ Six lines of logic. The signature carries all the ceremony — parameter types, contracts, effect declarations — so the body reads like a pipeline. Run a real example with `VERA_ANTHROPIC_API_KEY=sk-ant-... vera run` [`examples/inference.vera`](examples/inference.vera). See [`ENVIRONMENT.md`](ENVIRONMENT.md) for all `VERA_*` environment variables (provider keys, runtime knobs, debug flags).
74
+
75
+ ### Errors are instructions
76
+
77
+ Traditional compilers produce diagnostics for humans: `expected token '{'`. Vera produces instructions for the model that wrote the code. Every error includes what went wrong, why, how to fix it with a concrete code example, and a spec reference.
78
+
79
+ ```
80
+ [E001] Error at main.vera, line 14, column 1:
81
+
82
+ {
83
+ ^
84
+
85
+ Function is missing its contract block. Every function in Vera must declare
86
+ requires(), ensures(), and effects() clauses between the signature and the body.
87
+
88
+ Vera requires all functions to have explicit contracts so that every function's
89
+ behaviour is mechanically checkable.
90
+
91
+ Fix:
92
+
93
+ Add a contract block after the signature:
94
+
95
+ private fn example(@Int -> @Int)
96
+ requires(true)
97
+ ensures(@Int.result >= 0)
98
+ effects(pure)
99
+ {
100
+ ...
101
+ }
102
+
103
+ See: Chapter 5, Section 5.2 "Function Declaration Syntax"
104
+ ```
105
+
106
+ Every diagnostic has a stable error code (`E001`–`E702`) and is available as structured JSON via the `--json` flag.
107
+
108
+ ## Getting started
109
+
110
+ ### Prerequisites
111
+
112
+ - Python 3.11+
113
+ - Git
114
+ - Node.js 22+ *(optional, for browser runtime and parity tests)*
115
+
116
+ ### Installation
117
+
118
+ Install the released `veralang` distribution from PyPI:
119
+
120
+ ```bash
121
+ python -m venv .venv
122
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
123
+ python -m pip install veralang
124
+ ```
125
+
126
+ The distribution is named `veralang`, but the installed command remains
127
+ `vera`, and Python code still imports it as `import vera`. For editor and agent integration through the language server, install
128
+ `python -m pip install "veralang[lsp]"`. Do not run `pip install vera`: that
129
+ name belongs to an unrelated project on PyPI. The wheel ships the compiler and
130
+ the `vera` command only — the bundled `examples/`, the conformance suite, and
131
+ the specification live in the repository, not in the wheel.
132
+
133
+ The GitHub source route is the recommended environment for agents and for
134
+ anyone learning the language — it provides the examples, conformance programs,
135
+ and spec that [SKILL.md](SKILL.md) teaches from, alongside the toolchain — and
136
+ it remains the route for compiler development, unreleased changes, and testing
137
+ the current `main` branch:
138
+
139
+ ```bash
140
+ git clone https://github.com/aallan/vera.git
141
+ cd vera
142
+ python -m venv .venv
143
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
144
+ python -m pip install -e ".[dev]"
145
+ ```
146
+
147
+ `[dev]` includes everything (tests, linters, the language server). For a lighter
148
+ source install that only adds editor/agent support to the base toolchain, use
149
+ `python -m pip install -e ".[lsp]"` — see [LSP_SERVER.md](LSP_SERVER.md).
150
+
151
+ #### Supported platforms
152
+
153
+ Tested in CI on every commit:
154
+
155
+ - **macOS 15 (Sequoia) and macOS 26 (Tahoe)** on Apple Silicon, against Python 3.11, 3.12, 3.13
156
+ - **Ubuntu 24.04 LTS** on x86_64, against Python 3.11, 3.12, 3.13
157
+ - **Ubuntu 24.04 LTS** on aarch64, against Python 3.12 (advisory job — runs on every commit, does not gate merges yet)
158
+ - **Windows Server 2022** on x86_64, against Python 3.11, 3.12, 3.13
159
+
160
+ Untested but expected to work (wheels available for all dependencies):
161
+
162
+ - Linux x86_64 with glibc 2.27+ (Ubuntu 18.04+ / Debian 10+ / RHEL 8+)
163
+ - Linux aarch64 with glibc 2.38+ on Python 3.11 / 3.13 (the 3.12 cell is CI-tested above; e.g. Ubuntu 23.10+)
164
+ - macOS 15+ on Intel (x86_64)
165
+
166
+ Out of scope — `pip install -e .` will fail at dependency resolution (clear "no matching distribution" error rather than a cryptic source-build failure):
167
+
168
+ - **macOS 14 (Sonoma) and earlier** — see [#691](https://github.com/aallan/vera/issues/691) for the documented decision and workarounds
169
+ - **Linux aarch64 with glibc < 2.38** (e.g. Ubuntu 22.04 LTS aarch64) — see [#701](https://github.com/aallan/vera/issues/701)
170
+
171
+ The macOS 15+ baseline reflects [TelemetryDeck's macOS version distribution data](https://telemetrydeck.com/survey/apple/macOS/versions/): macOS 26 (~75%) and macOS 15 (~24%) account for ~99% of the macOS install base; macOS 14 is ~1.4% and falling. The cost of supporting older macOS versions does not earn its keep at that share.
172
+
173
+ ### The workflow
174
+
175
+ ![The workflow: an LLM agent writes Vera with mandatory contracts; vera check and vera verify prove the types and contracts, feeding every diagnostic — description, rationale, fix, spec_ref — straight back to the agent; when the proofs hold, vera run executes the WebAssembly on CLI, browser, WASI or HTTP.](assets/diagrams/workflow.svg)
176
+
177
+ ```
178
+ $ vera check examples/absolute_value.vera
179
+ OK: examples/absolute_value.vera
180
+
181
+ $ vera verify examples/safe_divide.vera
182
+ OK: examples/safe_divide.vera
183
+ Verification: 4 verified (Tier 1)
184
+
185
+ $ vera run examples/hello_world.vera
186
+ Hello, World!
187
+ ```
188
+
189
+ `vera check` parses and type-checks. `vera verify` adds contract verification via Z3 — Tier 1 contracts (decidable arithmetic, comparisons, Boolean logic, ADTs, termination) are proved automatically; contracts Z3 cannot decide become Tier 3 runtime checks. `vera run` compiles to WebAssembly and executes.
190
+
191
+ ```bash
192
+ vera run file.vera --fn f -- 42 # call function f with argument 42
193
+ vera compile --target browser file.vera # emit browser bundle
194
+ vera compile --target wasi-p2 file.vera # emit a WASI Preview 2 component (experimental)
195
+ vera run --target wasi-p2 file.vera # execute under the built-in WASI 0.2 host
196
+ vera serve file.vera # serve handle(Request -> Response) over HTTP (default :8000)
197
+ vera compile --target wasi-p2 --world server file.vera # wasi:http server component for wasmtime serve
198
+ vera test file.vera # contract-driven testing via Z3 + WASM
199
+ vera fmt file.vera # format to canonical form
200
+ vera verify --json file.vera # JSON diagnostics for agent feedback loops
201
+ vera check --explain-slots file.vera # show slot resolution table (which @T.n maps to which param)
202
+ vera lsp # serve the Language Server Protocol over stdio (see LSP_SERVER.md)
203
+ vera version # print the installed version
204
+ vera builtins --json # list the built-in function registry (no file needed)
205
+ vera effects --json # list the effect and ability registry (no file needed)
206
+ vera errors --json # list the diagnostic error-code registry E001–E702 (no file needed)
207
+ ```
208
+
209
+ `vera compile --target browser` produces a self-contained bundle (wasm + JS runtime + HTML) that runs in any browser — no build step, no bundler. Mandatory parity tests ensure identical behaviour between the command-line and browser runtimes for the pure-language surface (arithmetic, ADTs, pattern matching, closures, contracts, effects-as-host-imports, etc.). The IO surface is the documented exception: terminal Vera programs that rely on `IO.sleep` for animation pacing or ANSI escape codes for cursor control compile cleanly to `--target browser` but render the escapes as literal text and freeze the tab while sleeping — the browser target expects Vera to be the pure simulation core and JavaScript to drive timing and rendering ([SKILL.md §Browser compilation](SKILL.md#browser-compilation) has the recommended pattern).
210
+
211
+ `vera compile --target wasi-p2` emits an **experimental WASI Preview 2 target (IO and Random surface)**: a binary WebAssembly component whose host imports are implemented over WASI 0.2 interfaces, runnable by any stock wasip2 host (`wasmtime run` needs no flags and no Vera bindings). Programs using host families beyond IO/Random are rejected with a diagnostic naming the family — never silently compiled against the core target. See [spec chapter 13](spec/13-wasi.md) for the architecture, the supported surface, and the documented divergences (WASI 0.2's ok/err-only exit codes, no structured trap frames across the component boundary). With `--world server`, the same contract-verified `handle(Request -> Response)` program `vera serve` hosts natively compiles to a `wasi:http/incoming-handler` component that stock `wasmtime serve` runs unmodified — verified HTTP handlers as a portable deployment artifact (`--world server` is only valid together with `--target wasi-p2`; the CLI rejects other combinations).
212
+
213
+ ### Editor support
214
+
215
+ Vera ships a [language server](LSP_SERVER.md) (`vera lsp`, via the optional `[lsp]` extra) that keeps a warm incremental Z3 session between keystrokes — diagnostics, proofs, hover, slot go-to-definition, and typed-hole completion at editor latency, plus custom proof-delta methods for coding agents. See **[LSP_SERVER.md](LSP_SERVER.md)** for setup and the full protocol surface.
216
+
217
+ - **[VS Code extension](editors/vscode/)** — starts the language server automatically, plus syntax highlighting and language configuration
218
+ - **[TextMate bundle](editors/textmate/)** — syntax highlighting for Sublime Text and other TextMate-grammar editors (any editor with a generic LSP client can use `vera lsp` directly)
219
+
220
+ ## For agents
221
+
222
+ Vera ships with these files for LLM agents:
223
+
224
+ - [`SKILL.md`](SKILL.md) — Complete language reference. Covers syntax, slot references, contracts, effects, common mistakes, and working examples.
225
+ - [`AGENTS.md`](AGENTS.md) — Instructions for any agent system (Copilot, Cursor, Windsurf, custom). Covers both writing Vera code and working on the compiler.
226
+ - [`CLAUDE.md`](CLAUDE.md) — Project orientation for Claude Code. Key commands, layout, workflows, and invariants.
227
+ - [`DE_BRUIJN.md`](DE_BRUIJN.md) — Deep dive into Vera's typed slot references: the academic background, worked examples, the commutative-operations trap, and connections to proof assistants and LLM code-generation research.
228
+ - [`TOOLCHAIN.md`](TOOLCHAIN.md) — The CLI cookbook: driving the toolchain to write, verify, test, run, and debug Vera, plus the `builtins`/`effects`/`errors` introspection commands.
229
+
230
+ **Claude Code** discovers `SKILL.md` and `CLAUDE.md` automatically in this repo. For other projects, install the skill manually:
231
+
232
+ ```bash
233
+ mkdir -p ~/.claude/skills/vera-language
234
+ cp /path/to/vera/SKILL.md ~/.claude/skills/vera-language/SKILL.md
235
+ ```
236
+
237
+ **Other models** — include `SKILL.md` in the system prompt, as a file attachment, or as a retrieval document. The file is self-contained and works with any model that can read markdown.
238
+
239
+ **Essential rules** for writing Vera code:
240
+
241
+ 1. Every function needs `requires()`, `ensures()`, and `effects()` between the signature and body
242
+ 2. Use `@Type.index` to reference bindings — `@Int.0` is the most recent `Int`, `@Int.1` is the one before
243
+ 3. Declare all effects — `effects(pure)` for pure functions, `effects(<IO>)` for IO, etc.
244
+ 4. Recursive functions need a `decreases()` clause
245
+ 5. Match expressions must be exhaustive
246
+
247
+ ## Project status
248
+
249
+ Vera is in **active development** at v0.1.5: 2,000+ commits, 203 releases, 7,992 tests, 95% code coverage, 163 conformance programs, 39 examples, and a 14-chapter specification. Known bugs and limitations are tracked in **[KNOWN_ISSUES.md](KNOWN_ISSUES.md)**. See **[HISTORY.md](HISTORY.md)** for how the compiler was built.
250
+
251
+ The reference compiler — parser, AST, type checker, contract verifier (Z3), WASM code generator, module system, browser runtime, and runtime contract insertion — is working. The language specification is in draft across [14 chapters](spec/).
252
+
253
+ **Key features delivered:** [typed De Bruijn indices](DE_BRUIJN.md) (`@T.n`), mandatory contracts, algebraic effects (IO, Http, HttpServer, State, Exceptions, Async, Inference, Random, Diverge), refinement types, constrained generics (Eq, Ord, Hash, Show), algebraic data types, pattern matching, modules, 164 built-in functions (strings, arrays, maps, sets, decimals, math, JSON, HTML, Markdown, regex, base64, URL), contract-driven testing, canonical formatter, browser runtime, three-tier verification design (Z3 static and runtime fallback shipped; the Z3-guided tier is specified, not yet implemented), a [language server](LSP_SERVER.md) with warm incremental verification and agent-facing proof-delta methods, and contract-verified HTTP handlers served natively (`vera serve`) or as wasi:http components for stock `wasmtime serve` (`--target wasi-p2 --world server`).
254
+
255
+ **What's next:** the path from "working language" to "the language agents actually use" — see **[ROADMAP.md](ROADMAP.md)** for the four strategic milestones. The flagship goal is a verified MCP tool server where contracts guarantee tool schemas at compile time. **[VeraBench](https://github.com/aallan/vera-bench)** — a 50-problem benchmark across 5 difficulty tiers — now covers 6 models across 3 providers (v0.0.7). The headline result: Kimi K2.5 achieves 100% run_correct on Vera, beating both Python (86%) and TypeScript (91%). Three models beat TypeScript on Vera; the flagship tier averages 93% Vera vs 93% Python — essentially parity. These are single-run results with high variance — see the [full report](https://github.com/aallan/vera-bench) for details.
256
+
257
+ Known bugs and open issues are tracked on the **[issue tracker](https://github.com/aallan/vera/issues)**. See **[KNOWN_ISSUES.md](KNOWN_ISSUES.md)** for a consolidated list.
258
+
259
+ The compiler is a seven-stage pipeline — see [vera/README.md](vera/README.md) for the architecture in depth:
260
+
261
+ ![The compiler pipeline and module map: parse, transform and resolve feed the two-pass type checker; vera verify proves each contract obligation or defers it to a runtime guard, with a warm-verification sidecar for the LSP, while vera compile emits WAT and WASM for the wasmtime host, the browser bundle, or a WASI 0.2 component.](assets/diagrams/architecture.svg)
262
+
263
+ <details>
264
+ <summary><strong>Project structure</strong></summary>
265
+
266
+ ```
267
+ vera/
268
+ ├── SKILL.md # Language reference for LLM agents
269
+ ├── AGENTS.md # Instructions for any AI agent system
270
+ ├── CLAUDE.md # Project orientation for Claude Code
271
+ ├── FAQ.md # Design rationale and comparisons
272
+ ├── EXAMPLES.md # Language tour with code examples
273
+ ├── HISTORY.md # How the compiler was built
274
+ ├── ROADMAP.md # Forward-looking language roadmap
275
+ ├── KNOWN_ISSUES.md # Known bugs and limitations
276
+ ├── DESIGN.md # Technical decisions and prior art
277
+ ├── TESTING.md # Testing reference (single source of truth)
278
+ ├── CONTRIBUTING.md # Contributor guidelines
279
+ ├── CHANGELOG.md # Version history
280
+ ├── LICENSE # MIT licence
281
+ ├── spec/ # Language specification (14 chapters)
282
+ ├── vera/ # Reference compiler (Python)
283
+ │ ├── grammar.lark # Lark LALR(1) grammar
284
+ │ ├── parser.py # Parser module
285
+ │ ├── ast.py # Typed AST node definitions
286
+ │ ├── transform.py # Lark parse tree → AST transformer
287
+ │ ├── checker/ # Type checker (mixin package)
288
+ │ ├── verifier.py # Contract verifier (Z3)
289
+ │ ├── codegen/ # Code generation (13 modules)
290
+ │ ├── wasm/ # WASM translation (19 modules)
291
+ │ ├── browser/ # Browser runtime
292
+ │ ├── formatter.py # Canonical code formatter
293
+ │ ├── errors.py # LLM-oriented diagnostics
294
+ │ ├── obligations/ # Reified proof obligations + warm incremental verification
295
+ │ ├── lsp/ # Language server (see LSP_SERVER.md)
296
+ │ └── cli.py # Command-line interface
297
+ ├── docs/ # GitHub Pages site (veralang.dev)
298
+ ├── editors/ # VS Code extension (LSP client + grammar) + TextMate bundle
299
+ ├── examples/ # 39 example Vera programs
300
+ ├── tests/ # Test suite (see TESTING.md)
301
+ └── scripts/ # CI and validation scripts
302
+ ```
303
+
304
+ </details>
305
+
306
+ For compiler architecture and internals, see [`vera/README.md`](vera/README.md). For testing details, see **[TESTING.md](TESTING.md)**.
307
+
308
+ ## Design
309
+
310
+ See **[DESIGN.md](DESIGN.md)** for the full technical decisions table (representation, references, contracts, effects, verification, memory, target, grammar, diagnostics, data types, polymorphism, collections, error handling, recursion, naming) and **[prior art](DESIGN.md#prior-art)** (Eiffel, Dafny, F*, Koka, Liquid Haskell, Idris, SPARK/Ada, bruijn, TLA+/Alloy).
311
+
312
+ ## Contributing
313
+
314
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to Vera. For compiler internals, see [vera/README.md](vera/README.md).
315
+
316
+ ## Citation
317
+
318
+ If you use Vera in your research, please cite:
319
+
320
+ ```bibtex
321
+ @software{vera2026,
322
+ author = {Allan, Alasdair},
323
+ title = {Vera: a programming language designed for LLMs to write},
324
+ year = {2026},
325
+ url = {https://github.com/aallan/vera}
326
+ }
327
+ ```
328
+
329
+ ## Licence
330
+
331
+ Vera is licensed under the [MIT License](LICENSE).
332
+
333
+ All direct dependencies are MIT or Apache-2.0. One transitive dependency (`chardet`, via `cyclonedx-bom`) is LGPL v2+, which is compatible with MIT redistribution. Licence compliance is enforced by CI.
334
+
335
+ | Dependency | Licence | Role |
336
+ |-----------|---------|------|
337
+ | [Lark](https://github.com/lark-parser/lark) | MIT | LALR(1) parser generator |
338
+ | [z3-solver](https://github.com/Z3Prover/z3) | MIT | SMT solver for contract verification |
339
+ | [wasmtime](https://github.com/bytecodealliance/wasmtime) | Apache-2.0 | WebAssembly runtime |
340
+
341
+ Copyright &copy; 2026 Alasdair Allan
342
+
343
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
344
+
345
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
346
+
347
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.