Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VerifyTESLA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joydeep
VerifyTESLA
Commits
63966d9b
Commit
63966d9b
authored
May 14, 2015
by
acholewa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug where nested definitions were not being expanded properly.
parent
06ad7b50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
psl.py
psl.py
+2
-4
No files found.
psl.py
View file @
63966d9b
...
...
@@ -321,9 +321,7 @@ def gen_intermediate(parseTree, theoryFileName):
roleTermPair
[
DEF_KEY_TERM
]])
for
roleTermPair
,
shorthandLineNum
in
defMap
.
items
()])
else
:
defs
=
'$noDefs'
#&&&
#code.append(' '.join(['[', defs, ']']))
code
.
append
(
' '
.
join
([
'['
,
'$checkWellFormed('
,
defs
,
')'
,
']'
]))
code
.
append
(
' '
.
join
([
'['
,
'$makeIdem($checkWellFormed('
,
defs
,
'))'
,
']'
]))
code
.
append
(
'.'
)
return
code
...
...
@@ -446,7 +444,7 @@ def compute_sorts(defMap, syntaxFileName, pslTree):
#shorthand, and shorthand that does. Then we iteratively grow the shorthand that doesn't depend on others as we compute the
#sorts of the indepedent shorthand, until we've computed the sorts of all the shorthand.
shorthand
=
{
shorthand
for
shorthand
,
lineNumber
in
defMap
.
values
()}
dependentShorthand
=
{(
role
,
term
):
(
shorthand
,
lineNumber
)
for
((
role
,
term
),
(
shorthand
,
lineNumber
)
)
in
defMap
.
iteritems
()
if
dependentShorthand
=
{(
role
,
term
):
shorthandLineNum
for
((
role
,
term
),
shorthandLineNum
)
in
defMap
.
iteritems
()
if
set
(
term
.
split
()).
intersection
(
shorthand
)}
independentShorthand
=
{
roleTerm
:
defMap
[
roleTerm
]
for
roleTerm
in
defMap
if
not
roleTerm
in
dependentShorthand
}
knownShorthand
=
dict
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment