Mike, thanks for the Python analysis; Arpad, thanks for the links!
The online discussion mentioned the “boost.org” system, which is being applied
specifically to C++. While we should also consider VHDL and Verilog (and
variants), as IBIS supports them, IBIS-AMI with C++ is used fairly often, so
using a C++-friendly approach makes sense.
From the Boost naming convention
(http://www.boost.org/doc/libs/1_64_0/libs/filesystem/doc/reference.html#path-decomposition)
and the stackoverflow discussion:
Part Windows Posix
------------------------------------------------
Root name c: <empty>
Root directory \ /
Root path c:\ /
Relative path foo\bar\baa.txt foo/bar/baa.txt
Parent path c:\foo\bar /foo/bar
Filename baa.txt baa.txt
Stem baa baa
Extension .txt .txt
Path c:\foo\bar\baa.txt /foo/bar/baa/txt
In this nomenclature, our “basename” becomes “stem”, “file extension” becomes
“extension”, and “file name” and variants become “filename”. Relatively few
changes would be required in the existing IBIS text, but an introductory
paragraph would be needed to explain the notation above and provide suitable
references. We could also easily note that other languages and systems (making
explicit note of Python as an example) may assign the same terms to different
concepts.
Will this work?
- MM
From: Muranyi, Arpad [mailto:Arpad_Muranyi@xxxxxxxxxx]
Sent: Monday, April 24, 2017 9:16 AM
To: mlabonte@xxxxxxxxxx; Mirmak, Michael <michael.mirmak@xxxxxxxxx>
Cc: ibis-editorial@xxxxxxxxxxxxx; IBIS-ATM (ibis-macro@xxxxxxxxxxxxx)
<ibis-macro@xxxxxxxxxxxxx>
Subject: RE: File name concepts as used in IBIS 6.1
Just to add another twist to this conversation, in the HTML world, they
call this a URL. A URL can practically be anything, but in the end, it
is a reference to a file, whether it is local or somewhere in the big
wide world. Look at what they call the various components of a URL here:
https://www.w3schools.com/html/html_urlencode.asp
Can we learn something from this?
By the way, we don’t seem to be the only ones wrestling with this:
http://stackoverflow.com/questions/2235173/file-name-path-name-base-name-naming-standard-for-pieces-of-a-path
Thanks,
Arpad
==========================================================================
From:
ibis-editorial-bounce@xxxxxxxxxxxxx<mailto:ibis-editorial-bounce@xxxxxxxxxxxxx>
[mailto:ibis-editorial-bounce@xxxxxxxxxxxxx] On Behalf Of Mike LaBonte
Sent: Friday, April 21, 2017 8:33 PM
To: Michael Mirmak <michael.mirmak@xxxxxxxxx<mailto:michael.mirmak@xxxxxxxxx>>
Cc: ibis-editorial@xxxxxxxxxxxxx<mailto:ibis-editorial@xxxxxxxxxxxxx>; IBIS-ATM
(ibis-macro@xxxxxxxxxxxxx<mailto:ibis-macro@xxxxxxxxxxxxx>)
<ibis-macro@xxxxxxxxxxxxx<mailto:ibis-macro@xxxxxxxxxxxxx>>
Subject: [ibis-editorial] Re: File name concepts as used in IBIS 6.1
Looking outside of IBIS for a moment, the Perl
File::Basename<http://perldoc.perl.org/File/Basename.html> functions are:
($name,$path,$suffix) = fileparse($fullname,@suffixlist);
$basename = basename($fullname,@suffixlist);
$dirname = dirname($fullname);
In their terminology, if $fullname = 'a/b/c.d' and @suffixlist = ('.d') then:
$name = c
$path = a/b/
$suffix = .d
$basename = c.d
$dirname = a/b
So their idea of basename is what we in some places call file name. Note that
the use of DLL_ID as a basename is a slightly different concept. If DLL_ID is
serdes_16544 then a DLL might write files serdes_16544_cdrout.csv and
serdes_16544_dfeout.csv. I wonder if the term "file name fragment" might work
better there?
I think we need to decide what we will call each entity:
a/b/c.d file path? (not distinguishing between full and relative paths)
a/b directory path?
c.d file name?
c file base name?
d file extension?
Michael's effort to find the dominant current practice to determine a minimal
change that results in a consistent policy is worthwhile. My suggestions above
would not necessarily minimize the change. But Michael seems to have found that
"file name" is currently used for both "c.d" and "c", so it seems to me some
changes are warranted somewhere in the spec, no matter what we choose.
Mike
_____
From: "Michael Mirmak"
<michael.mirmak@xxxxxxxxx<mailto:michael.mirmak@xxxxxxxxx>>
To: "ibis-editorial@xxxxxxxxxxxxx<mailto:ibis-editorial@xxxxxxxxxxxxx>"
<ibis-editorial@xxxxxxxxxxxxx<mailto:ibis-editorial@xxxxxxxxxxxxx>>, "IBIS-ATM
(ibis-macro@xxxxxxxxxxxxx<mailto:ibis-macro@xxxxxxxxxxxxx>)"
<ibis-macro@xxxxxxxxxxxxx<mailto:ibis-macro@xxxxxxxxxxxxx>>
Sent: Friday, April 21, 2017 7:19:15 PM
Subject: [ibis-editorial] File name concepts as used in IBIS 6.1
Today’s discussion of BIRD189.2 focused on the concept of “file name” (and
variants on the term), and whether it refers to a string that includes an
extension, whether it is simply the pre-extension string, or whether it
includes path information. As noted by Bob Ross, the BIRD189.2 language is
closely modeled on .pkg and .ebd language in the IBIS document.
I conducted a brief set of searches through the IBIS 6.1 specification,
including on the phrases or words “base name”, “basename”, “file name” and
“filename”. My general findings are shown below, with quotations where
appropriate. All page numbers refer to the Adobe PDF* version of the file.
In brief, I believe Bob and Arpad were correct in their statements during the
meeting, and that there is a long-standing inconsistency in how we refer to
files in even pre-3.2 IBIS. In particular, the usage on pages 9 conflict with
the usage on 140 and 154. The latter two use “filename”, when “basename” would
be more consistent with usage elsewhere.
Fortunately, I believe we can very quickly make the document completely
consistent by using the phrase “base name” for the non-extension portion of the
string, and “file name” for the full string, appropriately and distinctly
defined, without forcing model or tool changes. Current BIRDs could be made
consistent with these definitions very easily.
Comments are welcome.
- MM
basename
--------
p. 9 – In the “GENERAL SYNTAX RULES AND GUIDELINES” section, “basename” may be
up to 40 characters in length, followed by a period and an
up-to-three-character extension
base name
--------
p. 213 - "The algorithmic model is responsible for using DLL_ID as the base
name for any data files that the model creates..."
filename
--------
p. 140 - regarding .pkg, “filename” refers to base file name without extension
p. 154 - regarding .ebd, “filename” refers to base file name without extension
file name
--------
p. 9 – “basename” is 40 characters, followed by a period and an
up-to-three-character "file name extension" (so here, file name is equivalent
to basename)
p. 18 - for [File Name], "the file name must use the extension '.ibs', '.pkg'
or '.ebd'. The file name must be the actual name of the file."
p. 100ff - for [External Model], “file name” implies extension is included, but
the phrase "file name extension" is used several times
p. 120ff - for [External Circuit], “file name” implies extension is included,
but the phrase "file name extension" is used several times
p. 221 - for Supporting_Files, "file name" is explicitly described in contrast
to directory names and paths