{{About|the functional language intended for numerical applications|hardware description language|SA-C (programming language)}} {{Infobox programming language | name = SAC | logo = SAC language logo.png | paradigm = [[Array programming|array]], [[Functional programming|functional]] | designer = Sven-Bodo Scholz, Clemens Grelck, ''et al.'' | developer = SaC Research Group | released = {{Start date and age|1994}} | latest release version = v2.0.0-85-1 | latest release date = {{Start date and age|2025|05|06|df=yes}} | typing = [[Static typing|static]], [[Type safety|strong]] | programming language = [[C (programming language)|C]], SAC | platform = [[x86-64]] | operating system = [[POSIX]]-compliant [[Unix]], [[macOS]] | license = [[Free software]] [https://gitlab.sac-home.org/sac-group/sac2c/-/commit/80b63293fb2c075230f6e0fa7140ba607a301a91] | file ext = .sac | website = {{URL|www.sac-home.org}} | influenced by = [[APL (programming language)|APL]], [[SISAL]], [[C (programming language)|C]] | influenced = }}
'''SAC''' ('''Single Assignment C''') is a strict [[Purely functional programming|purely functional]] [[programming language]] which design is focused on the needs of numerical applications. Emphasis is laid on efficient support for [[array processing]] via [[data parallelism]]. Efficiency concerns are essentially twofold. First, efficiency in program development is to be improved by the opportunity to specify array operations on a high level of [[abstraction]]. Second, efficiency in program execution, i.e., the runtime performance of programs, in time and memory consumption, is still to be achieved by sophisticated [[compiler|compiling]] schemes. Only as far as the latter succeeds, the [[High-level programming language|high-level]] style of specifications can actually be called useful.
To facilitate compiling to efficiently executable code, certain functional language features considered non-essential for numerical applications, e.g., [[higher-order function]]s, [[Polymorphism (computer science)|polymorphism]], or [[lazy evaluation]], are not supported by SAC (yet). They are supported in general-purpose functional languages, e.g., [[Haskell]], [[Clean (programming language)|Clean]], [[Miranda (programming language)|Miranda]], or [[ML (programming language)|ML]].
To overcome the acceptance problems encountered by other functional or array based languages intended for numerical or array intensive applications, e.g., [[SISAL]], [[NESL]], [[Nial]], [[APL (programming language)|APL]], [[J (programming language)|J]], or [[K (programming language)|K]], particular regard is paid to ease the transition from a [[C (programming language)|C]] or [[Fortran]] like programming environment to SAC.
In more detail, the basic language design goals of SAC are to:
* provide a purely functional language with a syntax very similar to that of C in order to ease, for a large community of programmers, the transition from an imperative to a functional [[programming style]]; * support multi-dimensional arrays as first class objects; * allow the specification of shape- and dimension-invariant array operations; * provide high-level array operations that liberate programming from tedious and error-prone specifications of starts, stops and strides for array traversals thereby improving [[Code reuse|code reusability]] and [[programming productivity]], in general. * incorporate a module system that allows for separate compiling, separate name spaces, and abstract data types, and, additionally, provides an interface to foreign languages in order to enable reuse of existing code; * provide means for a smooth integration of states and state modifications into the functional paradigm based on [[uniqueness type]]s; * use the module system, the foreign language interface, and the integration of states in order to create a standard library which provides a functionality similar to that of the standard C libraries, e.g. powerful I/O facilities or mathematical functions; * facilitate compiling to host [[machine code]] which can be efficiently executed both in terms of time and space demand; * facilitate compiling for non-sequential program execution in [[multiprocessor]] environments.
== References == *{{cite thesis |last1=Scholz |first1=Sven-Bodo |date=1996 |title=Single Assignment C – Entwurf Und Implementierung Einer Funktionalen C-variante Mit Spezieller Unterstützung Shape-invarianter Array-operationen |trans-title=Single Assignment C – Design and Implementation of a Functional C-variant with Special Support for Shape-invariant Array Operations |lang=de |publisher=Institute of Computer Science and Applied Mathematics, Christian-Albrecht University of Kiel |degree=PhD |place=Kiel, Germany}} *{{cite thesis |last1=Grelck |first1=Clemens |date=2001 |title=Implicit Shared Memory Multiprocessor Support for the Functional Programming Language SaC – Single Assignment C |lang=en |publisher=Institute of Computer Science and Applied Mathematics, Christian-Albrecht University of Kiel |degree=PhD |place=Kiel, Germany |isbn=((3-89722-719-3))}}
== External links == * {{Official website|www.sac-home.org}}
{{DEFAULTSORT:Sac Programming Language}} [[Category:Array programming languages]] [[Category:C programming language family]]