AeonLang 4.0.0b0__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 (101) hide show
  1. aeonlang-4.0.0b0/AeonLang.egg-info/PKG-INFO +128 -0
  2. aeonlang-4.0.0b0/AeonLang.egg-info/SOURCES.txt +99 -0
  3. aeonlang-4.0.0b0/AeonLang.egg-info/dependency_links.txt +1 -0
  4. aeonlang-4.0.0b0/AeonLang.egg-info/entry_points.txt +2 -0
  5. aeonlang-4.0.0b0/AeonLang.egg-info/requires.txt +25 -0
  6. aeonlang-4.0.0b0/AeonLang.egg-info/top_level.txt +1 -0
  7. aeonlang-4.0.0b0/PKG-INFO +128 -0
  8. aeonlang-4.0.0b0/Readme.md +86 -0
  9. aeonlang-4.0.0b0/aeon/__init__.py +0 -0
  10. aeonlang-4.0.0b0/aeon/__main__.py +155 -0
  11. aeonlang-4.0.0b0/aeon/backend/__init__.py +0 -0
  12. aeonlang-4.0.0b0/aeon/backend/evaluator.py +110 -0
  13. aeonlang-4.0.0b0/aeon/bindings/__init__.py +0 -0
  14. aeonlang-4.0.0b0/aeon/bindings/binding_utils.py +17 -0
  15. aeonlang-4.0.0b0/aeon/bindings/image.py +36 -0
  16. aeonlang-4.0.0b0/aeon/core/__init__.py +0 -0
  17. aeonlang-4.0.0b0/aeon/core/bind.py +175 -0
  18. aeonlang-4.0.0b0/aeon/core/distance.py +70 -0
  19. aeonlang-4.0.0b0/aeon/core/equality.py +102 -0
  20. aeonlang-4.0.0b0/aeon/core/instantiation.py +83 -0
  21. aeonlang-4.0.0b0/aeon/core/liquid.py +140 -0
  22. aeonlang-4.0.0b0/aeon/core/liquid_ops.py +45 -0
  23. aeonlang-4.0.0b0/aeon/core/pprint.py +147 -0
  24. aeonlang-4.0.0b0/aeon/core/substitutions.py +358 -0
  25. aeonlang-4.0.0b0/aeon/core/terms.py +205 -0
  26. aeonlang-4.0.0b0/aeon/core/types.py +286 -0
  27. aeonlang-4.0.0b0/aeon/decorators/__init__.py +50 -0
  28. aeonlang-4.0.0b0/aeon/decorators/api.py +17 -0
  29. aeonlang-4.0.0b0/aeon/elaboration/__init__.py +550 -0
  30. aeonlang-4.0.0b0/aeon/elaboration/context.py +72 -0
  31. aeonlang-4.0.0b0/aeon/elaboration/instantiation.py +72 -0
  32. aeonlang-4.0.0b0/aeon/facade/__init__.py +0 -0
  33. aeonlang-4.0.0b0/aeon/facade/api.py +175 -0
  34. aeonlang-4.0.0b0/aeon/facade/driver.py +159 -0
  35. aeonlang-4.0.0b0/aeon/frontend/__init__.py +0 -0
  36. aeonlang-4.0.0b0/aeon/frontend/aeon_core.lark +86 -0
  37. aeonlang-4.0.0b0/aeon/frontend/anf_converter.py +107 -0
  38. aeonlang-4.0.0b0/aeon/frontend/parser.py +195 -0
  39. aeonlang-4.0.0b0/aeon/locations/__init__.py +16 -0
  40. aeonlang-4.0.0b0/aeon/logger/__init__.py +0 -0
  41. aeonlang-4.0.0b0/aeon/logger/logger.py +34 -0
  42. aeonlang-4.0.0b0/aeon/lsp/__init__.py +0 -0
  43. aeonlang-4.0.0b0/aeon/lsp/aeon_adapter.py +179 -0
  44. aeonlang-4.0.0b0/aeon/lsp/server.py +107 -0
  45. aeonlang-4.0.0b0/aeon/optimization/__init__.py +0 -0
  46. aeonlang-4.0.0b0/aeon/optimization/normal_form.py +159 -0
  47. aeonlang-4.0.0b0/aeon/prelude/__init__.py +0 -0
  48. aeonlang-4.0.0b0/aeon/prelude/prelude.py +57 -0
  49. aeonlang-4.0.0b0/aeon/sugar/__init__.py +0 -0
  50. aeonlang-4.0.0b0/aeon/sugar/aeon_sugar.lark +131 -0
  51. aeonlang-4.0.0b0/aeon/sugar/ast_helpers.py +24 -0
  52. aeonlang-4.0.0b0/aeon/sugar/bind.py +179 -0
  53. aeonlang-4.0.0b0/aeon/sugar/desugar.py +304 -0
  54. aeonlang-4.0.0b0/aeon/sugar/equality.py +86 -0
  55. aeonlang-4.0.0b0/aeon/sugar/lifting.py +108 -0
  56. aeonlang-4.0.0b0/aeon/sugar/lowering.py +268 -0
  57. aeonlang-4.0.0b0/aeon/sugar/parser.py +348 -0
  58. aeonlang-4.0.0b0/aeon/sugar/program.py +296 -0
  59. aeonlang-4.0.0b0/aeon/sugar/stypes.py +95 -0
  60. aeonlang-4.0.0b0/aeon/sugar/substitutions.py +160 -0
  61. aeonlang-4.0.0b0/aeon/synthesis/__init__.py +0 -0
  62. aeonlang-4.0.0b0/aeon/synthesis/api.py +44 -0
  63. aeonlang-4.0.0b0/aeon/synthesis/decorators.py +191 -0
  64. aeonlang-4.0.0b0/aeon/synthesis/entrypoint.py +159 -0
  65. aeonlang-4.0.0b0/aeon/synthesis/fitness.py +102 -0
  66. aeonlang-4.0.0b0/aeon/synthesis/grammar/bounds.py +131 -0
  67. aeonlang-4.0.0b0/aeon/synthesis/grammar/ge_synthesis.py +134 -0
  68. aeonlang-4.0.0b0/aeon/synthesis/grammar/grammar_generation.py +496 -0
  69. aeonlang-4.0.0b0/aeon/synthesis/grammar/mangling.py +50 -0
  70. aeonlang-4.0.0b0/aeon/synthesis/grammar/refinements.py +111 -0
  71. aeonlang-4.0.0b0/aeon/synthesis/grammar/utils.py +43 -0
  72. aeonlang-4.0.0b0/aeon/synthesis/identification.py +158 -0
  73. aeonlang-4.0.0b0/aeon/synthesis/modules/synquid/build.py +148 -0
  74. aeonlang-4.0.0b0/aeon/synthesis/modules/synquid/synthesizer.py +77 -0
  75. aeonlang-4.0.0b0/aeon/synthesis/modules/synthesizerfactory.py +21 -0
  76. aeonlang-4.0.0b0/aeon/synthesis/uis/api.py +89 -0
  77. aeonlang-4.0.0b0/aeon/synthesis/uis/terminal.py +40 -0
  78. aeonlang-4.0.0b0/aeon/typechecking/__init__.py +0 -0
  79. aeonlang-4.0.0b0/aeon/typechecking/context.py +145 -0
  80. aeonlang-4.0.0b0/aeon/typechecking/entailment.py +58 -0
  81. aeonlang-4.0.0b0/aeon/typechecking/liquid.py +251 -0
  82. aeonlang-4.0.0b0/aeon/typechecking/typeinfer.py +388 -0
  83. aeonlang-4.0.0b0/aeon/typechecking/well_formed.py +56 -0
  84. aeonlang-4.0.0b0/aeon/utils/__init__.py +0 -0
  85. aeonlang-4.0.0b0/aeon/utils/ast_helpers.py +59 -0
  86. aeonlang-4.0.0b0/aeon/utils/ctx_helpers.py +21 -0
  87. aeonlang-4.0.0b0/aeon/utils/location.py +36 -0
  88. aeonlang-4.0.0b0/aeon/utils/name.py +48 -0
  89. aeonlang-4.0.0b0/aeon/utils/pprint_helpers.py +481 -0
  90. aeonlang-4.0.0b0/aeon/utils/superscripts.py +152 -0
  91. aeonlang-4.0.0b0/aeon/utils/time_utils.py +35 -0
  92. aeonlang-4.0.0b0/aeon/verification/__init__.py +0 -0
  93. aeonlang-4.0.0b0/aeon/verification/helpers.py +323 -0
  94. aeonlang-4.0.0b0/aeon/verification/horn.py +394 -0
  95. aeonlang-4.0.0b0/aeon/verification/horn2.py +17 -0
  96. aeonlang-4.0.0b0/aeon/verification/smt.py +413 -0
  97. aeonlang-4.0.0b0/aeon/verification/sub.py +141 -0
  98. aeonlang-4.0.0b0/aeon/verification/vcs.py +94 -0
  99. aeonlang-4.0.0b0/aeon/verification/wellformness.py +108 -0
  100. aeonlang-4.0.0b0/pyproject.toml +151 -0
  101. aeonlang-4.0.0b0/setup.cfg +4 -0
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: AeonLang
3
+ Version: 4.0.0b0
4
+ Summary: Language with Refinement Types
5
+ Author-email: Alcides Fonseca <me@alcidesfonseca.com>
6
+ License: https://opensource.org/licenses/MIT
7
+ Project-URL: homepage, https://github.com/alcides/aeon
8
+ Project-URL: repository, https://github.com/alcides/aeon
9
+ Project-URL: documentation, https://github.com/alcides/aeon
10
+ Keywords: programming language, liquid types
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: ~=3.10
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: argparse
19
+ Requires-Dist: configparser
20
+ Requires-Dist: lark
21
+ Requires-Dist: loguru
22
+ Requires-Dist: geneticengine==0.8.7
23
+ Requires-Dist: multiprocess
24
+ Requires-Dist: numpy
25
+ Requires-Dist: pathos
26
+ Requires-Dist: pillow
27
+ Requires-Dist: psb2
28
+ Requires-Dist: pydantic==2.11.7
29
+ Requires-Dist: pygls==1.3.1
30
+ Requires-Dist: pytest
31
+ Requires-Dist: requests
32
+ Requires-Dist: types-requests
33
+ Requires-Dist: scikit-image
34
+ Requires-Dist: sympy
35
+ Requires-Dist: textdistance
36
+ Requires-Dist: z3-solver>=4
37
+ Requires-Dist: zstandard==0.23.0
38
+ Requires-Dist: zss
39
+ Provides-Extra: tests
40
+ Requires-Dist: pytest; extra == "tests"
41
+ Requires-Dist: pytest-beartype; extra == "tests"
42
+
43
+ # Aeon 4
44
+
45
+ Aeon is a programming languages that features Liquid Types, developed at the University of Lisbon. Unlike [LiquidHaskell](https://ucsd-progsys.github.io/liquidhaskell/) or [LiquidJava](https://catarinagamboa.github.io/liquidjava.html), Aeon was designed from the ground up to have support for Liquid Types.
46
+
47
+ Aeon is in development, so assume all your programs to break. This 4th version is implemented as a Python interpreter, giving you access to any code written in Python.
48
+
49
+ ## Examples
50
+
51
+
52
+ ### Hello World
53
+
54
+ ```
55
+ def main (args:Int) : Unit {
56
+ print "Hello World"
57
+ }
58
+ ```
59
+
60
+ The documentation is available at [https://alcides.github.io/aeon](https://alcides.github.io/aeon).
61
+
62
+
63
+ ### Liquid Types
64
+
65
+ In this example, you can see the refined type `{x:Int | x > 0}` that represents all integers that are greater than 0. You can also see an example of Python FFI, where a python valid expression can be written as string and passed as the argument to the `native` function.
66
+
67
+ ```
68
+ def sqrt : (i: {x:Int | x > 0} ) -> Float = native "__import__('math').sqrt";
69
+
70
+ def main (i:Int) : Unit {
71
+ print (sqrt (-25)) # This is a type-checking error!
72
+ }
73
+ ```
74
+
75
+
76
+
77
+ Authors
78
+ ----------
79
+ Aeon has been developed at [LASIGE](https://www.lasige.pt), [University of Lisbon](https://ciencias.ulisboa.pt) by:
80
+
81
+ * [Alcides Fonseca](http://alcidesfonseca.com)
82
+ * [Paulo Santos](https://pcanelas.com/)
83
+ * [Eduardo Madeira](https://www.lasige.pt/member/jose-eduardo-madeira)
84
+ * [Guilherme Espada](https://espada.dev)
85
+ * [Lishun Su](https://lasige.pt/member/su-lishun/)
86
+ * [Paulo Silva](https://github.com/PauloHS-Silva)
87
+ * [Diogo Sousa](https://github.com/SousaTrashBin)
88
+
89
+ Acknowledgements
90
+ ----------------
91
+
92
+ This work was supported by Fundação para a Ciência e Tecnologia (FCT) through:
93
+
94
+ * [the LASIGE Research Unit](https://www.lasige.pt) (ref. UID/00408/2025)
95
+ * [the FCT Exploratory project RAP](http://wiki.alcidesfonseca.com/research/projects/rap/) (EXPL/CCI-COM/1306/2021)
96
+ * the FCT Advanced Computing projects (CPCA/A1/395424/2021, CPCA/A1/5613/2020, CPCA/A2/6009/2020)
97
+
98
+ And by Lisboa2020, Compete2020 and FEDER through:
99
+
100
+ * [the CMU|Portugal CAMELOT project](http://wiki.alcidesfonseca.com/research/projects/camelot/) (LISBOA-01-0247-FEDER-045915)
101
+
102
+
103
+ Publications
104
+ -----------------
105
+
106
+ * [Comparing the expressive power of Strongly-Typed and Grammar-Guided Genetic Programming](https://www.researchgate.net/publication/370277603_Comparing_the_expressive_power_of_Strongly-Typed_and_Grammar-Guided_Genetic_Programming) at GECCO'23
107
+ * [The Usability Argument for Refinement Typed Genetic Programming](https://link.springer.com/chapter/10.1007/978-3-030-58115-2_2) at PPSN'20
108
+
109
+ Let us know if your paper uses Aeon, to list it here.
110
+
111
+ Please cite as:
112
+
113
+ ```
114
+ Fonseca, Alcides, Paulo Santos, and Sara Silva. "The usability argument for refinement typed genetic programming." International Conference on Parallel Problem Solving from Nature. Cham: Springer International Publishing, 2020.
115
+ ```
116
+
117
+ Bibtex:
118
+
119
+ ```
120
+ @inproceedings{fonseca2020usability,
121
+ title={The usability argument for refinement typed genetic programming},
122
+ author={Fonseca, Alcides and Santos, Paulo and Silva, Sara},
123
+ booktitle={International Conference on Parallel Problem Solving from Nature},
124
+ pages={18--32},
125
+ year={2020},
126
+ organization={Springer}
127
+ }
128
+ ```
@@ -0,0 +1,99 @@
1
+ Readme.md
2
+ pyproject.toml
3
+ AeonLang.egg-info/PKG-INFO
4
+ AeonLang.egg-info/SOURCES.txt
5
+ AeonLang.egg-info/dependency_links.txt
6
+ AeonLang.egg-info/entry_points.txt
7
+ AeonLang.egg-info/requires.txt
8
+ AeonLang.egg-info/top_level.txt
9
+ aeon/__init__.py
10
+ aeon/__main__.py
11
+ aeon/backend/__init__.py
12
+ aeon/backend/evaluator.py
13
+ aeon/bindings/__init__.py
14
+ aeon/bindings/binding_utils.py
15
+ aeon/bindings/image.py
16
+ aeon/core/__init__.py
17
+ aeon/core/bind.py
18
+ aeon/core/distance.py
19
+ aeon/core/equality.py
20
+ aeon/core/instantiation.py
21
+ aeon/core/liquid.py
22
+ aeon/core/liquid_ops.py
23
+ aeon/core/pprint.py
24
+ aeon/core/substitutions.py
25
+ aeon/core/terms.py
26
+ aeon/core/types.py
27
+ aeon/decorators/__init__.py
28
+ aeon/decorators/api.py
29
+ aeon/elaboration/__init__.py
30
+ aeon/elaboration/context.py
31
+ aeon/elaboration/instantiation.py
32
+ aeon/facade/__init__.py
33
+ aeon/facade/api.py
34
+ aeon/facade/driver.py
35
+ aeon/frontend/__init__.py
36
+ aeon/frontend/aeon_core.lark
37
+ aeon/frontend/anf_converter.py
38
+ aeon/frontend/parser.py
39
+ aeon/locations/__init__.py
40
+ aeon/logger/__init__.py
41
+ aeon/logger/logger.py
42
+ aeon/lsp/__init__.py
43
+ aeon/lsp/aeon_adapter.py
44
+ aeon/lsp/server.py
45
+ aeon/optimization/__init__.py
46
+ aeon/optimization/normal_form.py
47
+ aeon/prelude/__init__.py
48
+ aeon/prelude/prelude.py
49
+ aeon/sugar/__init__.py
50
+ aeon/sugar/aeon_sugar.lark
51
+ aeon/sugar/ast_helpers.py
52
+ aeon/sugar/bind.py
53
+ aeon/sugar/desugar.py
54
+ aeon/sugar/equality.py
55
+ aeon/sugar/lifting.py
56
+ aeon/sugar/lowering.py
57
+ aeon/sugar/parser.py
58
+ aeon/sugar/program.py
59
+ aeon/sugar/stypes.py
60
+ aeon/sugar/substitutions.py
61
+ aeon/synthesis/__init__.py
62
+ aeon/synthesis/api.py
63
+ aeon/synthesis/decorators.py
64
+ aeon/synthesis/entrypoint.py
65
+ aeon/synthesis/fitness.py
66
+ aeon/synthesis/identification.py
67
+ aeon/synthesis/grammar/bounds.py
68
+ aeon/synthesis/grammar/ge_synthesis.py
69
+ aeon/synthesis/grammar/grammar_generation.py
70
+ aeon/synthesis/grammar/mangling.py
71
+ aeon/synthesis/grammar/refinements.py
72
+ aeon/synthesis/grammar/utils.py
73
+ aeon/synthesis/modules/synthesizerfactory.py
74
+ aeon/synthesis/modules/synquid/build.py
75
+ aeon/synthesis/modules/synquid/synthesizer.py
76
+ aeon/synthesis/uis/api.py
77
+ aeon/synthesis/uis/terminal.py
78
+ aeon/typechecking/__init__.py
79
+ aeon/typechecking/context.py
80
+ aeon/typechecking/entailment.py
81
+ aeon/typechecking/liquid.py
82
+ aeon/typechecking/typeinfer.py
83
+ aeon/typechecking/well_formed.py
84
+ aeon/utils/__init__.py
85
+ aeon/utils/ast_helpers.py
86
+ aeon/utils/ctx_helpers.py
87
+ aeon/utils/location.py
88
+ aeon/utils/name.py
89
+ aeon/utils/pprint_helpers.py
90
+ aeon/utils/superscripts.py
91
+ aeon/utils/time_utils.py
92
+ aeon/verification/__init__.py
93
+ aeon/verification/helpers.py
94
+ aeon/verification/horn.py
95
+ aeon/verification/horn2.py
96
+ aeon/verification/smt.py
97
+ aeon/verification/sub.py
98
+ aeon/verification/vcs.py
99
+ aeon/verification/wellformness.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ aeon = aeon.__main__:main
@@ -0,0 +1,25 @@
1
+ argparse
2
+ configparser
3
+ lark
4
+ loguru
5
+ geneticengine==0.8.7
6
+ multiprocess
7
+ numpy
8
+ pathos
9
+ pillow
10
+ psb2
11
+ pydantic==2.11.7
12
+ pygls==1.3.1
13
+ pytest
14
+ requests
15
+ types-requests
16
+ scikit-image
17
+ sympy
18
+ textdistance
19
+ z3-solver>=4
20
+ zstandard==0.23.0
21
+ zss
22
+
23
+ [tests]
24
+ pytest
25
+ pytest-beartype
@@ -0,0 +1 @@
1
+ aeon
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: AeonLang
3
+ Version: 4.0.0b0
4
+ Summary: Language with Refinement Types
5
+ Author-email: Alcides Fonseca <me@alcidesfonseca.com>
6
+ License: https://opensource.org/licenses/MIT
7
+ Project-URL: homepage, https://github.com/alcides/aeon
8
+ Project-URL: repository, https://github.com/alcides/aeon
9
+ Project-URL: documentation, https://github.com/alcides/aeon
10
+ Keywords: programming language, liquid types
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: ~=3.10
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: argparse
19
+ Requires-Dist: configparser
20
+ Requires-Dist: lark
21
+ Requires-Dist: loguru
22
+ Requires-Dist: geneticengine==0.8.7
23
+ Requires-Dist: multiprocess
24
+ Requires-Dist: numpy
25
+ Requires-Dist: pathos
26
+ Requires-Dist: pillow
27
+ Requires-Dist: psb2
28
+ Requires-Dist: pydantic==2.11.7
29
+ Requires-Dist: pygls==1.3.1
30
+ Requires-Dist: pytest
31
+ Requires-Dist: requests
32
+ Requires-Dist: types-requests
33
+ Requires-Dist: scikit-image
34
+ Requires-Dist: sympy
35
+ Requires-Dist: textdistance
36
+ Requires-Dist: z3-solver>=4
37
+ Requires-Dist: zstandard==0.23.0
38
+ Requires-Dist: zss
39
+ Provides-Extra: tests
40
+ Requires-Dist: pytest; extra == "tests"
41
+ Requires-Dist: pytest-beartype; extra == "tests"
42
+
43
+ # Aeon 4
44
+
45
+ Aeon is a programming languages that features Liquid Types, developed at the University of Lisbon. Unlike [LiquidHaskell](https://ucsd-progsys.github.io/liquidhaskell/) or [LiquidJava](https://catarinagamboa.github.io/liquidjava.html), Aeon was designed from the ground up to have support for Liquid Types.
46
+
47
+ Aeon is in development, so assume all your programs to break. This 4th version is implemented as a Python interpreter, giving you access to any code written in Python.
48
+
49
+ ## Examples
50
+
51
+
52
+ ### Hello World
53
+
54
+ ```
55
+ def main (args:Int) : Unit {
56
+ print "Hello World"
57
+ }
58
+ ```
59
+
60
+ The documentation is available at [https://alcides.github.io/aeon](https://alcides.github.io/aeon).
61
+
62
+
63
+ ### Liquid Types
64
+
65
+ In this example, you can see the refined type `{x:Int | x > 0}` that represents all integers that are greater than 0. You can also see an example of Python FFI, where a python valid expression can be written as string and passed as the argument to the `native` function.
66
+
67
+ ```
68
+ def sqrt : (i: {x:Int | x > 0} ) -> Float = native "__import__('math').sqrt";
69
+
70
+ def main (i:Int) : Unit {
71
+ print (sqrt (-25)) # This is a type-checking error!
72
+ }
73
+ ```
74
+
75
+
76
+
77
+ Authors
78
+ ----------
79
+ Aeon has been developed at [LASIGE](https://www.lasige.pt), [University of Lisbon](https://ciencias.ulisboa.pt) by:
80
+
81
+ * [Alcides Fonseca](http://alcidesfonseca.com)
82
+ * [Paulo Santos](https://pcanelas.com/)
83
+ * [Eduardo Madeira](https://www.lasige.pt/member/jose-eduardo-madeira)
84
+ * [Guilherme Espada](https://espada.dev)
85
+ * [Lishun Su](https://lasige.pt/member/su-lishun/)
86
+ * [Paulo Silva](https://github.com/PauloHS-Silva)
87
+ * [Diogo Sousa](https://github.com/SousaTrashBin)
88
+
89
+ Acknowledgements
90
+ ----------------
91
+
92
+ This work was supported by Fundação para a Ciência e Tecnologia (FCT) through:
93
+
94
+ * [the LASIGE Research Unit](https://www.lasige.pt) (ref. UID/00408/2025)
95
+ * [the FCT Exploratory project RAP](http://wiki.alcidesfonseca.com/research/projects/rap/) (EXPL/CCI-COM/1306/2021)
96
+ * the FCT Advanced Computing projects (CPCA/A1/395424/2021, CPCA/A1/5613/2020, CPCA/A2/6009/2020)
97
+
98
+ And by Lisboa2020, Compete2020 and FEDER through:
99
+
100
+ * [the CMU|Portugal CAMELOT project](http://wiki.alcidesfonseca.com/research/projects/camelot/) (LISBOA-01-0247-FEDER-045915)
101
+
102
+
103
+ Publications
104
+ -----------------
105
+
106
+ * [Comparing the expressive power of Strongly-Typed and Grammar-Guided Genetic Programming](https://www.researchgate.net/publication/370277603_Comparing_the_expressive_power_of_Strongly-Typed_and_Grammar-Guided_Genetic_Programming) at GECCO'23
107
+ * [The Usability Argument for Refinement Typed Genetic Programming](https://link.springer.com/chapter/10.1007/978-3-030-58115-2_2) at PPSN'20
108
+
109
+ Let us know if your paper uses Aeon, to list it here.
110
+
111
+ Please cite as:
112
+
113
+ ```
114
+ Fonseca, Alcides, Paulo Santos, and Sara Silva. "The usability argument for refinement typed genetic programming." International Conference on Parallel Problem Solving from Nature. Cham: Springer International Publishing, 2020.
115
+ ```
116
+
117
+ Bibtex:
118
+
119
+ ```
120
+ @inproceedings{fonseca2020usability,
121
+ title={The usability argument for refinement typed genetic programming},
122
+ author={Fonseca, Alcides and Santos, Paulo and Silva, Sara},
123
+ booktitle={International Conference on Parallel Problem Solving from Nature},
124
+ pages={18--32},
125
+ year={2020},
126
+ organization={Springer}
127
+ }
128
+ ```
@@ -0,0 +1,86 @@
1
+ # Aeon 4
2
+
3
+ Aeon is a programming languages that features Liquid Types, developed at the University of Lisbon. Unlike [LiquidHaskell](https://ucsd-progsys.github.io/liquidhaskell/) or [LiquidJava](https://catarinagamboa.github.io/liquidjava.html), Aeon was designed from the ground up to have support for Liquid Types.
4
+
5
+ Aeon is in development, so assume all your programs to break. This 4th version is implemented as a Python interpreter, giving you access to any code written in Python.
6
+
7
+ ## Examples
8
+
9
+
10
+ ### Hello World
11
+
12
+ ```
13
+ def main (args:Int) : Unit {
14
+ print "Hello World"
15
+ }
16
+ ```
17
+
18
+ The documentation is available at [https://alcides.github.io/aeon](https://alcides.github.io/aeon).
19
+
20
+
21
+ ### Liquid Types
22
+
23
+ In this example, you can see the refined type `{x:Int | x > 0}` that represents all integers that are greater than 0. You can also see an example of Python FFI, where a python valid expression can be written as string and passed as the argument to the `native` function.
24
+
25
+ ```
26
+ def sqrt : (i: {x:Int | x > 0} ) -> Float = native "__import__('math').sqrt";
27
+
28
+ def main (i:Int) : Unit {
29
+ print (sqrt (-25)) # This is a type-checking error!
30
+ }
31
+ ```
32
+
33
+
34
+
35
+ Authors
36
+ ----------
37
+ Aeon has been developed at [LASIGE](https://www.lasige.pt), [University of Lisbon](https://ciencias.ulisboa.pt) by:
38
+
39
+ * [Alcides Fonseca](http://alcidesfonseca.com)
40
+ * [Paulo Santos](https://pcanelas.com/)
41
+ * [Eduardo Madeira](https://www.lasige.pt/member/jose-eduardo-madeira)
42
+ * [Guilherme Espada](https://espada.dev)
43
+ * [Lishun Su](https://lasige.pt/member/su-lishun/)
44
+ * [Paulo Silva](https://github.com/PauloHS-Silva)
45
+ * [Diogo Sousa](https://github.com/SousaTrashBin)
46
+
47
+ Acknowledgements
48
+ ----------------
49
+
50
+ This work was supported by Fundação para a Ciência e Tecnologia (FCT) through:
51
+
52
+ * [the LASIGE Research Unit](https://www.lasige.pt) (ref. UID/00408/2025)
53
+ * [the FCT Exploratory project RAP](http://wiki.alcidesfonseca.com/research/projects/rap/) (EXPL/CCI-COM/1306/2021)
54
+ * the FCT Advanced Computing projects (CPCA/A1/395424/2021, CPCA/A1/5613/2020, CPCA/A2/6009/2020)
55
+
56
+ And by Lisboa2020, Compete2020 and FEDER through:
57
+
58
+ * [the CMU|Portugal CAMELOT project](http://wiki.alcidesfonseca.com/research/projects/camelot/) (LISBOA-01-0247-FEDER-045915)
59
+
60
+
61
+ Publications
62
+ -----------------
63
+
64
+ * [Comparing the expressive power of Strongly-Typed and Grammar-Guided Genetic Programming](https://www.researchgate.net/publication/370277603_Comparing_the_expressive_power_of_Strongly-Typed_and_Grammar-Guided_Genetic_Programming) at GECCO'23
65
+ * [The Usability Argument for Refinement Typed Genetic Programming](https://link.springer.com/chapter/10.1007/978-3-030-58115-2_2) at PPSN'20
66
+
67
+ Let us know if your paper uses Aeon, to list it here.
68
+
69
+ Please cite as:
70
+
71
+ ```
72
+ Fonseca, Alcides, Paulo Santos, and Sara Silva. "The usability argument for refinement typed genetic programming." International Conference on Parallel Problem Solving from Nature. Cham: Springer International Publishing, 2020.
73
+ ```
74
+
75
+ Bibtex:
76
+
77
+ ```
78
+ @inproceedings{fonseca2020usability,
79
+ title={The usability argument for refinement typed genetic programming},
80
+ author={Fonseca, Alcides and Santos, Paulo and Silva, Sara},
81
+ booktitle={International Conference on Parallel Problem Solving from Nature},
82
+ pages={18--32},
83
+ year={2020},
84
+ organization={Springer}
85
+ }
86
+ ```
File without changes
@@ -0,0 +1,155 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ import sys
5
+ from argparse import ArgumentParser
6
+
7
+ from aeon.facade.api import AeonError
8
+ from aeon.facade.driver import AeonConfig, AeonDriver
9
+ from aeon.logger.logger import export_log
10
+ from aeon.logger.logger import setup_logger
11
+ from aeon.lsp.server import AeonLanguageServer
12
+ from aeon.synthesis.uis.api import SynthesisUI, SynthesisFormat
13
+ from aeon.synthesis.uis.terminal import TerminalUI
14
+ from aeon.utils.pprint_helpers import pretty_print
15
+
16
+ sys.setrecursionlimit(10000)
17
+
18
+
19
+ def parse_arguments():
20
+ parser = argparse.ArgumentParser()
21
+
22
+ if "-lsp" in sys.argv or "--language-server-mode" in sys.argv:
23
+ parser.add_argument(
24
+ "-lsp",
25
+ "--language-server-mode",
26
+ action="store_true",
27
+ help="run language server mode",
28
+ )
29
+ parser.add_argument(
30
+ "--tcp",
31
+ help="listen on tcp port or hostname:port on IPv4.",
32
+ type=str,
33
+ )
34
+
35
+ else:
36
+ parser.add_argument("filename", help="name of the aeon files to be synthesized")
37
+
38
+ _parse_common_arguments(parser)
39
+ return parser.parse_args()
40
+
41
+
42
+ def _parse_common_arguments(parser: ArgumentParser):
43
+ parser.add_argument("--core", action="store_true", help="synthesize a aeon core file")
44
+ parser.add_argument("--budget", type=int, default=60, help="Time for synthesis (in seconds).")
45
+ parser.add_argument(
46
+ "-l",
47
+ "--log",
48
+ nargs="+",
49
+ default="",
50
+ help="""set log level: \nTRACE \nDEBUG \nINFO \nWARNINGS \nCONSTRAINT \nTYPECHECKER \nSYNTH_TYPE \nCONSTRAINT \nSYNTHESIZER
51
+ \nERROR \nCRITICAL\n TIME""",
52
+ )
53
+ parser.add_argument(
54
+ "-f",
55
+ "--logfile",
56
+ action="store_true",
57
+ help="export log file",
58
+ )
59
+ parser.add_argument(
60
+ "-d",
61
+ "--debug",
62
+ action="store_true",
63
+ help="Show debug information",
64
+ )
65
+
66
+ parser.add_argument(
67
+ "-t",
68
+ "--timings",
69
+ action="store_true",
70
+ help="Show timing information",
71
+ )
72
+
73
+ parser.add_argument("-n", "--no-main", action="store_true", help="Disables introducing hole in main")
74
+
75
+ parser.add_argument(
76
+ "-s",
77
+ "--synthesizer",
78
+ type=str,
79
+ default="gp",
80
+ help="Select a synthesizer for synthesis(gp for Genetic programming(Defaut), synquid for Synquid, random_search for Random Search, enumerative for Enumerative Search, hc for Hill Climbing, and 1p1 for One Plus One)",
81
+ )
82
+
83
+ parser.add_argument(
84
+ "--format",
85
+ type=str,
86
+ choices=["default", "json"],
87
+ default="default",
88
+ help="Select the synthesised holes format results: default or json",
89
+ )
90
+
91
+ return parser.parse_args()
92
+
93
+
94
+ def select_synthesis_ui() -> SynthesisUI:
95
+ return TerminalUI()
96
+
97
+
98
+ def handle_error(err: AeonError):
99
+ # TODO: handle each error with proper printing
100
+ match err:
101
+ case _:
102
+ print(f">>> Error at {err.position()}:")
103
+ print(err)
104
+
105
+
106
+ def main() -> None:
107
+ args = parse_arguments()
108
+
109
+ logger = setup_logger()
110
+ logfile_name = None
111
+ if hasattr(args, "filename"):
112
+ logfile_name = args.filename
113
+ elif hasattr(args, "language_server_mode"):
114
+ logfile_name = "lsp"
115
+ export_log(args.log, args.logfile, logfile_name)
116
+
117
+ if args.debug:
118
+ logger.add(sys.stderr)
119
+ if args.timings:
120
+ logger.add(sys.stderr, level="TIME")
121
+
122
+ cfg = AeonConfig(
123
+ synthesizer=args.synthesizer,
124
+ synthesis_ui=select_synthesis_ui(),
125
+ synthesis_budget=args.budget,
126
+ timings=args.timings,
127
+ no_main=args.no_main,
128
+ synthesis_format=SynthesisFormat.from_string(args.format),
129
+ )
130
+ driver = AeonDriver(cfg)
131
+
132
+ if hasattr(args, "language_server_mode"):
133
+ aeon_lsp = AeonLanguageServer(driver)
134
+ aeon_lsp.start(args.tcp)
135
+ sys.exit(0)
136
+
137
+ if args.core:
138
+ errors = driver.parse_core(args.filename)
139
+ else:
140
+ errors = driver.parse(args.filename)
141
+
142
+ if errors:
143
+ for err in errors:
144
+ handle_error(err)
145
+ elif driver.has_synth():
146
+ term = driver.synth()
147
+ print("Synthesized:")
148
+ print(str(term))
149
+ print(pretty_print(term))
150
+ else:
151
+ driver.run()
152
+
153
+
154
+ if __name__ == "__main__":
155
+ main()
File without changes