MELT

1 program Added 2026-02-28T15:05:01Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: Middle End Lisp Translator, GCC MELT
Provenance: commit 432f5024b5 · authored 2026-02-28T16:05:25+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

IT (0.19)ALTRAN (0.19)COMTRAN (0.18)ALTAC (0.14)xtUML (0.13)

LLM-contributed programs

Count GCC Functions Pass

Provenance: commit 432f5024b5 · authored 2026-02-28T16:05:25+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.melt · license: Public Domain · added: 2026-02-28T15:05:01Z
;; -*- lisp -*- 
(comment "file ex02m-countfun.melt in the public domain")
;; the global object countaing our counter
(definstance fun_counter class_container 
	     :container_value '0)

;; the counting function, as an extra GCC pass
(defun countfun_pass_exec ()
  (set_content fun_counter (+ivi !fun_counter 1))
  (debug "incremented fun_counter=" fun_counter)
  )

;; the function triggered by our funcounter mode
(defun funcounter_docmd (cmd moduldata)
  (debug "funcounter_docmd cmd=" cmd)
  (let ( (countfunpass (instance class_gcc_gimple_pass
				 :named_name '"countfun_pass"
				 :gccpass_exec countfun_pass_exec))
	 )
    (install_melt_pass_in_gcc countfunpass :after '"cfg" 0)
    (debug "countfunpass=" countfunpass)
    (at_exit_first
     (lambda ()
       (let ( (:long nbcount (get_int !fun_counter))
	      )
	 (code_chunk 
	  informusercount
	  #{ /*$INFORMUSERCOUNT*/ inform(UNKNOWN_LOCATION,
				    "MELT counted %ld functions / $INFORMUSERCOUNT", 
				    $NBCOUNT) ; 
	  }#))))
    (debug "funcounter mode success cmd=" cmd)
    (return :true)
    ))

(definstance funcounter_mode
  class_melt_mode
  :named_name '"funcounter"
  :meltmode_help '"install a pass to count functions"
  :meltmode_fun funcounter_docmd
)
(install_melt_mode funcounter_mode)

Contribute — propose a file extension

Tell us where to find evidence about MELT (mapped to pl/melt). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/MELT/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← melpha-pm memcached →