tlaplus/tlaplus

Document how to add module search path to TLC

オープン

#795 opened on 2023/02/20

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Java (179 件のフォーク)batch import
Toolsenhancementgood first issuehelp wantedquestion

Repository metrics

Stars
 (2,153 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

I cannot figure out how to get TLC to use additional module search paths, and thus it will fail to find modules. This issue is currently causing the tlaplus/examples CI to fail: https://github.com/tlaplus/Examples/actions/runs/4217199484

Expected Behavior

I expected TLC to use the TLA-Library java environment variable to expand its module search paths, or expose this functionality in a command line parameter.

Actual Behavior

SANY will use TLA-Library to find a module just fine, but when running TLC the module resolution will fail.

Steps to Reproduce

  1. Clone tlaplus/examples repo
  2. Download tla2tools.jar to repo root from http://nightly.tlapl.us/dist/tla2tools.jar
  3. Download TLAPS source code from latest pre-release and extract to directory tlapm in repo root
  4. Run java -DTLA-Library=specifications/Paxos:tlapm/library -cp tla2tools.jar tla2sany.SANY specifications/Paxos/MCPaxos.tla, see that it succeeds
  5. Run java -DTLA-Library=tlapm/library -cp tla2tools.jar tlc2.TLC specifications/Paxos/MCPaxos, see that it fails with "Cannot find source file for module TLAPS imported in module Voting"

Steps Taken to Fix

I looked in the source code for other ways of defining the search path but could not find any. I found #490 but defining TLA_PATH also didn't seem to work.

Possible Fix

TLC should look in all the paths defined in TLA-Library for module resolution.

Your Environment

  • TLC version: TLC2 Version 2.18 of Day Month 20?? (rev: c40eabe)
  • Operating System: Arch Linux

コントリビューターガイド