12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758(**************************************************************************)(* *)(* SPDX-License-Identifier LGPL-2.1 *)(* Copyright (C) *)(* CEA (Commissariat à l'énergie atomique et aux énergies alternatives) *)(* *)(**************************************************************************)(** Constant Propagation *)includePlugin.Register(structletname="semantic constant folding"letshortname="scf"lethelp="propagates constants semantically"end)moduleSemanticConstFolding=False(structletoption_name="-scf"lethelp="pretty print a version of the source code where each constant expression is replaced by its value"end)let()=SemanticConstFolding.add_aliases["-semantic-const-folding"]moduleSemanticConstFold=Fundec_set(structletoption_name="-scf-fct"letarg_name="f1, ..., fn"lethelp="propagate constants only into functions f1,...,fn"end)let()=SemanticConstFold.add_aliases["-semantic-const-fold"]moduleCastIntro=False(structletoption_name="-scf-allow-cast"lethelp="replace expressions by constants even when doing so \
requires a pointer cast"end)let()=CastIntro.add_aliases["-cast-from-constant"]moduleExpandLogicContext=False(structletoption_name="-scf-logic"lethelp="replace values from logical context and create corresponding variables (HIGHLY EXPERIMENTAL)"end)let()=ExpandLogicContext.add_aliases["-semantic-const-fold-logic"]moduleProject_name=String(structletoption_name="-scf-project-name"letdefault="propagated"letarg_name=""lethelp="name of the generated project (default is `propagated`)"end)