view win/lwlib.vcxproj @ 434:052c5f335a92

Fix bug in like terms collection in expression simplification Like term collection would lose the actual "variable" part of the term if the second term collected happened to have no coefficient. This would cause the expression to take the value of the calculated coefficient which is obviously wrong. Thanks to hider <stego@satx.rr.com> for reporting the bug and providing a proper test case. Observation: this bug has been present since the first pre-release of lwtools 3.0 when the algebraic expression system was introduced. Apparently people tend not to create expressions that trigger the like terms handler. The specific conditions require the symbol to be undefined and the second operand to the addition has to have no coefficient so it's likely a fairly rare scenario. Still, it is somewhat surprising that nobody tripped on it before now.
author William Astle <lost@l-w.ca>
date Mon, 23 Jan 2017 22:58:36 -0700
parents 4130ffdeb5c8
children
line wrap: on
line source

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\lwlib\lw_alloc.c" />
    <ClCompile Include="..\lwlib\lw_cmdline.c" />
    <ClCompile Include="..\lwlib\lw_error.c" />
    <ClCompile Include="..\lwlib\lw_expr.c" />
    <ClCompile Include="..\lwlib\lw_free.c" />
    <ClCompile Include="..\lwlib\lw_realloc.c" />
    <ClCompile Include="..\lwlib\lw_stack.c" />
    <ClCompile Include="..\lwlib\lw_string.c" />
    <ClCompile Include="..\lwlib\lw_stringlist.c" />
    <ClCompile Include="..\lwlib\lw_win.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lwlib\lw_alloc.h" />
    <ClInclude Include="..\lwlib\lw_cmdline.h" />
    <ClInclude Include="..\lwlib\lw_error.h" />
    <ClInclude Include="..\lwlib\lw_expr.h" />
    <ClInclude Include="..\lwlib\lw_stack.h" />
    <ClInclude Include="..\lwlib\lw_string.h" />
    <ClInclude Include="..\lwlib\lw_stringlist.h" />
    <ClInclude Include="..\lwlib\lw_version.h" />
    <ClInclude Include="..\lwlib\lw_win.h" />
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{93A52E3F-D19D-4A1A-8B8F-15270BD3D0E2}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>lwlib</RootNamespace>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v120</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</OutDir>
    <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</OutDir>
    <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\</IntDir>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>