Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
70bba08
feat: add start config
p1onerka Sep 25, 2025
5140c40
feat: add config files
sofyak0zyreva Sep 25, 2025
ee59c3e
feat: add ast, types, parser from fp 1.0
sofyak0zyreva Sep 25, 2025
eccdd85
feat: repl
sofyak0zyreva Sep 25, 2025
7bc107e
feat: pretty printer from fp1.0
sofyak0zyreva Sep 25, 2025
a7dfd76
fix: parsing top level constructions, reuse parser from fp1.0
sofyak0zyreva Sep 27, 2025
ec02463
ref: remove duplicate function
sofyak0zyreva Sep 27, 2025
95aaa0b
feat: compiler for factorial codegen
p1onerka Oct 4, 2025
ac00905
feat: add types for intermediate representation of assembler
p1onerka Oct 4, 2025
ff71111
feat: add new modules to dune
p1onerka Oct 4, 2025
270c007
ref: fmt
p1onerka Oct 4, 2025
e80b66e
feat: launch of compiler inside repl
p1onerka Oct 4, 2025
212f4de
ref: delete old opam file
p1onerka Oct 4, 2025
a491847
style: use stdlib, temporarily remove some instructions
sofyak0zyreva Oct 4, 2025
a4a76ba
feat: add cram test for factorial
sofyak0zyreva Oct 4, 2025
181c326
ci: rename project folder
sofyak0zyreva Oct 5, 2025
7f2d8a3
docs: modify .opam files
sofyak0zyreva Oct 5, 2025
5d875c1
docs: add surnames to pairing.md [skip ci]
sevenbunu Sep 17, 2025
dda00ea
[skip ci] docs: add PudgeWithMoML team to pairing.md
Ycyken Sep 19, 2025
a1b536b
WIP on task 2
Kakadu Sep 29, 2025
42e7a6c
[skip ci] docs: add ZondbiML to pairing.md
spisladqo Oct 1, 2025
85c4ec1
[skip ci]: add Sergeev & Belyanin DOOML team (#10)
georgiy-belyanin Oct 4, 2025
30530dd
feat: add XML team to md (#12)
qrutyy Oct 4, 2025
16abcad
AML: RISC-V factorial codegen (Dmitriy Chirkov & Rodion Suvorov) (#14)
suvorovrain Oct 4, 2025
1d6599f
Add RISC-V factorial codegen ("akaML" by Rodionov Maxim and Zaikin Vl…
RodionovMaxim05 Oct 4, 2025
0c59a60
RISC-V factorial codegen (PudgeWithMoML by Gleb Nasretdinov & Ilhom K…
Ycyken Oct 4, 2025
a50a22f
WIP on Future tasks
Kakadu Oct 10, 2025
e9b17bd
[skip ci]: add oMLet to pairing
p1onerka Oct 10, 2025
405ea7f
fix: add entry symbol _start to generated assembly listing
sofyak0zyreva Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions AML/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/_build
/_coverage

2 changes: 2 additions & 0 deletions AML/.ocamlformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version=0.27.0
profile=janestreet
40 changes: 40 additions & 0 deletions AML/AML.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "A ML compiler"
maintainer: ["suvorovrain" "," "kinokotakenoko9"]
authors: ["suvorovrain" "," "kinokotakenoko9"]
license: ["LGPL-2.1-or-later" "WITH" "OCaml-LGPL-linking-exception"]
homepage: "https://github.com/suvorovrain/AML"
bug-reports: "https://github.com/suvorovrain/AML/issues"
depends: [
"dune" {>= "3.8" & = "3.19.1"}
"base"
"angstrom" {= "0.16.0"}
"qcheck-core"
"ppx_inline_test" {with-test}
"ppx_deriving"
"ppx_deriving_qcheck" {= "0.6"}
"ppx_expect"
"bisect_ppx"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/suvorovrain/AML.git"
pin-depends: [
["ppx_deriving_qcheck.0.6" "git+https://github.com/c-cube/qcheck.git#42429bf06ba12373cad02b1404f50d0ad6238af5"]
]

# Don't edit '*.opam' file manually. Use 'dune build @install'
5 changes: 5 additions & 0 deletions AML/AML.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pin-depends: [
["ppx_deriving_qcheck.0.6" "git+https://github.com/c-cube/qcheck.git#42429bf06ba12373cad02b1404f50d0ad6238af5"]
]

# Don't edit '*.opam' file manually. Use 'dune build @install'
30 changes: 30 additions & 0 deletions AML/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.PHONY: all test
all:
dune build

test:
dune test

TEST_COV_D = /tmp/cov
COVERAGE_OPTS = --coverage-path $(TEST_COV_D) --expect lib/

fmt:
dune build @fmt --auto-promote

lint:
dune build @lint --force

release:
dune build --profile=release
dune runtest --profile=release

.PHONY: test_coverage coverage
test_coverage: coverage
coverage:
$(RM) -r $(TEST_COV_D)
mkdir -p $(TEST_COV_D)
BISECT_FILE=$(TEST_COV_D)/language dune runtest --no-print-directory \
--instrument-with bisect_ppx --force
bisect-ppx-report html $(COVERAGE_OPTS)
bisect-ppx-report summary $(COVERAGE_OPTS)
@echo "Use 'xdg-open _coverage/index.html' to see coverage report"
47 changes: 47 additions & 0 deletions AML/bin/AML.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
(** Copyright 2025-2026, Rodion Suvorov, Dmitriy Chirkov*)

(** SPDX-License-Identifier: LGPL-3.0-or-later *)

open Codegen
open Format

let usage_msg = "Usage: AML.exe <input file> <output file>"

let read_file filename =
let ic = open_in filename in
let len = in_channel_length ic in
let s = really_input_string ic len in
close_in ic;
s
;;

let write_file filename content =
let oc = open_out filename in
output_string oc content;
close_out oc
;;

let parse_args = function
| [ input; output ] -> input, output
| _ ->
prerr_endline usage_msg;
exit 1
;;

let compile input_file output_file =
let src = read_file input_file in
let program = Parser.parse_str src in
let buf = Buffer.create 1024 in
let fmt = formatter_of_buffer buf in
codegen fmt program;
pp_print_flush fmt ();
write_file output_file (Buffer.contents buf);
Printf.printf "Generated: %s\n" output_file
;;

let main input_file output_file =
let input_file, output_file = parse_args [ input_file; output_file ] in
compile input_file output_file
;;

let () = main Sys.argv.(1) Sys.argv.(2)
3 changes: 3 additions & 0 deletions AML/bin/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(executable
(name AML)
(libraries stdio base Parser Inferencer Pprinter Codegen))
33 changes: 33 additions & 0 deletions AML/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(lang dune 3.8)

(name AML)

(generate_opam_files true)

(source
(github suvorovrain/AML))

(authors "suvorovrain" , "kinokotakenoko9")

(maintainers "suvorovrain" , "kinokotakenoko9")

(license LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception)

(package
(name AML)
(synopsis "A ML compiler")
(depends
(dune
(= "3.19.1"))
base
(angstrom
(= "0.16.0"))
qcheck-core
(ppx_inline_test :with-test)
ppx_deriving
(ppx_deriving_qcheck
(= "0.6"))
ppx_expect
bisect_ppx))

; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
Loading
Loading