\usepackage[nolangwarn,nonumberlist,prefix]{glossaries-extra}
\setabbreviationstyle{long-short}
\setabbreviationstyle[noexpand]{short-nolong}
\setabbreviationstyle[acronym]{long-short}
\Addlcwords{of}

\newcommand*{\glsxtrpostnameacronym}{%
	\space\rm\glsentrylong{\glscurrententrylabel}%
}
%\renewcommand*{\glsxtrpostdescabbreviation}{%
% \space (initialism)%
%}

\usepackage{glossary-mcols}
\pdfstringdefDisableCommands{%
	\def\glsxtrlong#1{}%
	\def\glsxtrlongpl#1{}%
	\def\glsxtrshort#1{}%
	\def\glsxtrshortpl#1{}%
	\def\Glsxtrlong#1{}%
	\def\Glsxtrlongpl#1{}%
	\def\Glsxtrshort#1{}%
	\def\Glsxtrshortpl#1{}%
	\def\gls#1{}%
	\def\glspl#1{}%
	\def\Gls#1{}%
	\def\Glspl#1{}%
	\def\MakeUppercase#1{}%
}

% Initialize the glossaries
\makeglossaries%

% Acronyms
\newacronym[description={a open data interchange format using human readable text},category=noexpand]{JSON}{JSON}{(JavaScript object notation)}
\newacronym[description={a publish-subscribe network protocol designed for resource constrained devices},category=noexpand]{MQTT}{MQTT}{(MQ telemetry transport)}
\newacronym[description={a pure lazy \glsxtrlong{FP} language based on graph rewriting},category=noexpand]{CLEAN}{Clean}{(Clean language of East-Anglia and Nijmegen)}
\newacronym[description={a simple serial communication protocol often used to connect sensors to microcontrollers},category=noexpand]{I2C}{\IIC{}}{(inter-integrated circuit)}
\newacronym[description={}]{PIR}{PIR}{passive infrared}
\newacronym[description={}]{TOP}{TOP}{task-oriented programming}
\newacronym[description={the three ``CO'' (composability, comprehensibility, correctness) of working software},category=noexpand]{3COWS}{3COWS}{}

% Initialisms
\newabbreviation{ADC}{ADC}{analog-to-digital converter}
\newabbreviation{ADT}{ADT}{algebraic data type}
\newabbreviation{AST}{AST}{abstract syntax tree}
\newabbreviation{API}{API}{application programming interface}
\newabbreviation{ARDSL}{ARDSL}{\gls{ARDUINO} \glsxtrshort{DSL}}
\newabbreviation{CRS}{CRS}{\gls{CLEAN} Raspberry Pi system}
\newabbreviation{CRTS}{CRTS}{\gls{CLEAN} Raspberry Pi temperature sensor}
\newabbreviation{CWS}{CWS}{\gls{CLEAN} \gls{WEMOS} system}
\newabbreviation{CWTS}{CWTS}{\gls{CLEAN} \gls{WEMOS} temperature sensor}
\newabbreviation{DHT}{DHT}{digital humidity and temperature}
\newabbreviation{DSL}{DSL}{domain-specific language}
\newabbreviation{DVFS}{DVFS}{dynamic voltage and frequency scaling}
\newabbreviation{EDSL}{eDSL}{embedded \glsxtrlong{DSL}}
\newabbreviation[prefixfirst={a\ },prefix={an\ }]{FP}{FP}{functional programming}
\newabbreviation[prefixfirst={a\ },prefix={an\ }]{FRP}{FRP}{functional reactive programming}
\newabbreviation[prefixfirst={a\ },prefix={an\ }]{FPGA}{FPGA}{field-programmable gate array}
\newabbreviation{GADT}{GADT}{generalised \glsxtrshort{ADT}}
\newabbreviation{GHC}{GHC}{Glasgow \gls{HASKELL} compiler}
\newabbreviation{GPIO}{GPIO}{general-purpose \glsxtrlong{IO}}
\newabbreviation{GPL}{GPL}{general-purpose language}
\newabbreviation{GRS}{GRS}{graph rewriting system}
\newabbreviation{GUI}{GUI}{graphical \glsxtrlong{UI}}
\newabbreviation{HOAS}{HOAS}{high-order abstract syntax}
\newabbreviation{IOT}{\IOT{}}{internet of things}
\newabbreviation[category=noexpand]{IDE}{IDE}{integrated development environment}
\newabbreviation[category=noexpand]{IO}{I/O}{input/output}
\newabbreviation{IR}{IR}{intermediate representation}
\newabbreviation{ISR}{ISR}{interrupt service routine}
\newabbreviation[category=noexpand,prefixfirst={a\ },prefix={an\ }]{LED}{LED}{light-emitting diode}
\newabbreviation[category=noexpand]{OLED}{OLED}{organic \glsxtrshort{LED}}
\newabbreviation[category=noexpand]{OS}{OS}{operating system}
\newabbreviation{PFRP}{P-FRP}{priority-based \glsxtrshort{FRP}}
\newabbreviation{PRS}{PRS}{\gls{PYTHON} Raspberry Pi system}
\newabbreviation{PWS}{PWS}{\gls{MICROPYTHON} \gls{WEMOS} system}
\newabbreviation{PRTS}{PRTS}{\gls{PYTHON} Raspberry Pi temperature sensor}
\newabbreviation{PWTS}{PWTS}{\gls{MICROPYTHON} \gls{WEMOS} temperature sensor}
\newabbreviation{QDSL}{QDSL}{quoted \glsxtrshort{DSL}}
\newabbreviation[category=noexpand]{RAM}{RAM}{random-access memory}
\newabbreviation{RFID}{RFID}{radio-frequency identification}
\newabbreviation{RTOS}{RTOS}{real-time \glsxtrshort{OS}}
\newabbreviation{RTS}{RTS}{run-time system}
\newabbreviation[prefixfirst={a\ },prefix={an\ }]{SDS}{SDS}{shared data source}
\newabbreviation[prefixfirst={a\ },prefix={an\ }]{SN}{SN}{sensor network}
\newabbreviation{SLOC}{SLOC}{source lines of code}
\newabbreviation[description={a synchronous serial communication protocol often used to connect sensors to microcontrollers}]{SPI}{SPI}{Serial Peripheral Interface}
\newabbreviation{TH}{TH}{Template \gls{HASKELL}}
\newabbreviation[category=noexpand]{TCP}{TCP}{transmission control protocol}
\newabbreviation{TOSD}{TOSD}{task-oriented software development}
\newabbreviation{TTH}{TTH}{typed \glsxtrlong{TH}}
\newabbreviation{TVOC}{TVOC}{total volatile organic compounds}
\newabbreviation{UI}{UI}{user interface}
\newabbreviation{UOD}{UoD}{universe of discourse}
\newabbreviation{UOG}{UoG}{University of Glasgow}
\newabbreviation{VM}{VM}{virtual machine}

% Glossaries
\newglossaryentry{ABC}{%
	name=ABC,
	description={\gls{CLEAN}'s intermediate graph-rewriting language},
}
\newglossaryentry{ECO2}{%
	name={eCO\textsubscript{2}},
	description={CO\textsubscript{2} concentration calculated from \glsxtrshort{TVOC} measurements},
}
\newglossaryentry{MTASK}{%
	name=mTask,
	description={a \glsxtrshort{TOP} \glsxtrshort{EDSL} for edge devices integrated with the \gls{ITASK} system},
}
\newglossaryentry{ITASK}{%
	name=iTask,
	description={a \glsxtrshort{TOP} \glsxtrshort{EDSL} for creating distributed multi-user collaborative web applications},
}
\newglossaryentry{TOPHAT}{%
	name=TopHat,
	description={a \glsxtrshort{TOP} language designed to formally capture the essence of \gls{TOP}}
}
\newglossaryentry{HASKELL}{%
	name=Haskell,
	description={a pure lazy \glsxtrlong{FP} language designed by a committe as a concept language}
}
\newglossaryentry{ARDUINO}{%
	name=Arduino,
	description={a widely used framework for programming microcontrollers}
}
\newglossaryentry{CPP}{
	name=C\texttt{++},
	description={a general-purpose imperative programming language based on \gls{C}}
}
\newglossaryentry{C}{
	name=C,
	description={a general-purpose imperative programming}
}
\newglossaryentry{WIFI}{
	name=Wi-Fi,
	description={is a family of wireless network protocols commonly used for local area networking}
}
\newglossaryentry{PYTHON}{
	name=Python,
	description={a multi-paradigm interpreted programming language}
}
\newglossaryentry{MICROPYTHON}{
	name=MicroPython,
	description={a \gls{PYTHON} implementation tailored for microcontrollers}
}
\newglossaryentry{ONEWIRE}{
	name=1-wire,
	description={a simple single wire communication protocol often used to connect sensors to microcontrollers}
}
\newglossaryentry{WEMOS}{
	name=WEMOS,
	description={a popular ESP8266 microcontroller based prototyping platform supporting \gls{ARDUINO}.}
}
