ags799 / aldb

The Alloy Debugger
MIT License
0 stars 0 forks source link

Breakpoints #7

Open hayesconverse opened 9 years ago

hayesconverse commented 9 years ago

In the debugger, b file:line# places a breakpoint at line# that omits line# from all further executions until the breakpoint is removed or the debugger closes.

ags799 commented 9 years ago

Also let them use break file:line#

ags799 commented 9 years ago

If the breakpoint is put outside of the execution path (including on the module nameOfModule line) it has no impact. This includes Sig declarations, other than a fact that is appended to the Sig declaration.

If the breakpoint is put on a pred or fun or assert or fact signature, then break at the first statement following that.

ags799 commented 9 years ago

Breakpoints are only valid for separating ANDs and ORs. It is meaningless for NOTs. Try controlling parsing to ignore what follows a breakpoint. Demonstrate how this will help the user. Should have way to list breakpoints, add breakpoints, and remove breakpoints. Look at Alloy grammar to ensure that breakpoints do not result in invalid Alloy model.

ags799 commented 9 years ago

Look at alloy4compiler.parser.CompModule, alloy4compiler.ast.Browsable.showAsTree.

ags799 commented 9 years ago

Add this method to src/main/aldb/Cli.java:

/** Set a breakpoint at the specified line number. */
@asg.cliche.Command
public final String break(final int lineNumber) {
  // do stuff
}
ags799 commented 9 years ago

Keep in mind that we will want to be able to remove breakpoints after they are set.

hayesconverse commented 9 years ago

Gotcha. On Nov 18, 2014, at 2:08 PM, ags799 notifications@github.com wrote:

Keep in mind that we will want to be able to remove breakpoints after they are set.

— Reply to this email directly or view it on GitHub.